Jump to content

Recommended Posts

here is what I have(which obviously does not work lol)

 

<form id="form1" name="form1" method="post" action="">
  <label>Files
  <select name="select">
<option value="http://localhost/file1.php">File 1</option>
<option value="http://localhost/file2.php">File 2</option>
  </select>
  </label>
  <input type="submit" name="submit" value="submit">

 

Basically I think my option value is wrong...

any help is much appreciated.

Link to comment
https://forums.phpfreaks.com/topic/89331-solved-drop-down-form-option-syntax/
Share on other sites

You need to submit the form using javscript

 

 

<script language="javascript">

function submits(form1){

val=form1.sel.value

form1.action = val;

form1.submit();

}

</script>

 

call the above funcion on click of the submit button and change the buttons inpu type to button from type=submit

 

 

Rgds

Sharad

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.