0

I'm setting up a form on a static page, where users will "input" text + "select" option, then the "submit"button should modify the iframe "scr" url to https://example.com/"text value"+"option "

I went on some other pages, but couldn't find a simple script to it

<form>First name:<br>
<input type="text" name="firstname">

<select>
<option value="A">A</option>
<option value="B">B</option>
</select>

<input type="submit" value="Submit">

</form>

<iframe src="https://example.com/"> </iframe>

<script> ...  </script>
4
  • So you have multiple steps to sort out and haven't shown any effort to accomplish any of those steps. Have you tried anything? If so - show what you have tried... if not - break this up into small steps and research each one then start combining them Commented Jul 18, 2019 at 16:52
  • Hi, I have tried to combine that solution stackoverflow.com/questions/46781030/form-input-to-change-url/… with that one stackoverflow.com/questions/3730159/…, but was unsuccessful Commented Jul 18, 2019 at 17:03
  • OK..so the big difference is (I think) you don't want the actual form to submit by default browser submit process which means you need to prevent the default event. Otherwise page will reload due to default process Commented Jul 18, 2019 at 17:06
  • thanks, well I tried the following codepen.io/anon/pen/GVgEJy, but guess i am missing some basics here Commented Jul 19, 2019 at 8:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.