MyBB Community Forums

Full Version: [Request] Help with form submission
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am having a bunch of problems with this redirecting to "Additional Pages 404 Error"
I want the selections to send them to a url / PM preset message.

<script>
jQuery( document ).ready(function( $ ) {
    $( ".go-btn" ).click(function() {
        // Grab text from select boxes
        var firstSelection = $( "#selection1 option:selected" ).text();
        var secondSelection = $( "#selection2 option:selected" ).text();

        // Set URL, change as necessary
        var url = "http://chillforum.net/private.php?action=send&uid=9&subject=" + firstSelection + "&message=" + secondSelection;

        // Redirect
        window.location.href = url;
    });
});
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<form>
<div class="selCont">
  
  <h2>Award Request Form</h2>

I'm requesting:
  <select id="select1">
  	<option value=" " selected="selected">- Select -</option>
    <option value="1">HackForums Award</option>
    <option value="2">Old Phag Award</option>
    <option value="3">Bitcoin Award</option>
    <option value="4">Weed Award</option>
    <option value="5">Rich Dawg Award</option>
    <option value="6">Referral God</option>
    <option value="7">Cool Kid Award</option>

  </select>

Proof or Reasons you deserve the award.:
  <select id="select2">
    <option value=" " selected="selected">- Select -</option>
    <option value="1">This reward please</option>
  </select>

  <button class="go-btn" type="submit">Go</button>
  
</div>
<div id="selected"></div>
</form>
You are offering to pay someone to help you? Otherwise this should be in plugin support.
Terribly sorry, Didn't know this was payment only section. If you could move that would be nice, or delete thread and I will repost. Smile
I am having problems with this script. It keeps redirecting me to a 404 Page. I cannot seem for the life of me find out the problem..
<script>

jQuery( document ).ready(function( $ ) {
    $( ".go-btn" ).click(function() {
        // Grab text from select boxes
        var firstSelection = $( "#selection1 option:selected" ).text();
        var secondSelection = $( "#selection2 option:selected" ).text();

        // Set URL, change as necessary
        var url = "http://chillforum.net/private.php?action=send&uid=9&subject=" + firstSelection + "&message=" + secondSelection;

        // Redirect
        window.location.href = url;
    });
});
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<form>
<div class="selCont">
  
  <h2>Award Request Form</h2>

I'm requesting:
  <select id="select1">
  <option value=" " selected="selected">- Select -</option>
    <option value="1">HackForums Award</option>
    <option value="2">Old Phag Award</option>
    <option value="3">Bitcoin Award</option>
    <option value="4">Weed Award</option>
    <option value="5">Rich Dawg Award</option>
    <option value="6">Referral God</option>
    <option value="7">Cool Kid Award</option>

  </select>

Proof or Reasons you deserve the award.:
  <select id="select2">
    <option value=" " selected="selected">- Select -</option>
    <option value="1">This reward please</option>
  </select>

  <button class="go-btn" type="submit">Go</button>
  
</div>
<div id="selected"></div>
</form>
Moved to Plugin Support with threads merged.
What 404 page? what is the URL when you click "Go"?
It moves back to "----".com/pages.php?

You do not have permission to access this page. This could be because of one of the following reasons: