php - Retrieving form field and display value in fancybox -


i trying create basic form 1 text field. when user inputs code text field. when click submit have iframe pop url + text field value.

everything looks me setup correctly fancybox loading screen never goes away , iframe never shows.

this sample of not working:

<form id="form" onsubmit="fancybox.iframe('http://www.regonline.com/eventinfo.asp?eventid=' + document.form.event.value);return false;" autocomplete="off" style="height: 100%;" enctype="multipart/form-data" action="/contact/tabid/59/default.aspx" method="post" name="form">     <input type="text" name="event"> </form>  <?php     $eventid = $_post['event'];     echo '<a class="fancybox fancybox.iframe" href="http://www.regonline.com/eventinfo.asp?eventid='. $eventid .'">submit</a>'; ?> 

this work opens window , cannot working fancybox iframe:

<form id="form" onsubmit="window.open('http://www.regonline.com/eventinfo.asp?eventid=' + document.form.event.value);return false;" autocomplete="off" style="height: 100%;" enctype="multipart/form-data" action="/contact/tabid/59/default.aspx" method="post" name="form">     <input type="text" name="event">     <br>     <a class="event" onclick="window.open('http://www.regonline.com/eventinfo.asp?eventid=' + document.form.event.value);" href="#">submit</a> </form> 

i'm sure super simple right set of eyes, gentle ;)

it seems you're missing code or didn't paste all.

where form submission handled? see have link , href want iframe value, i'm not understanding connection between all.

if on clicking link populates input field called event, you're populating whole url. if you're using field populate iframe in onsubmit line, you're appending whole url url again, creating url in end: http://www.regonline.com/eventinfo.asp?eventid=http://www.regonline.com/eventinfo.asp?eventid=some_id_number

without seeing code, i'm speculating want href in submit link include $eventid value , not whole url.

so code might need be:

 echo '<a class="fancybox fancybox.iframe" href="'. $eventid .'">submit</a>'; 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -