Forum Moderators: coopster
The user inputs info in the form and on submit it returns a special link code based on their input. I've got it set to display the link code twice on the page, one so they can copy it and the other I want to use to open an iframe on the page with that link code so they can see the changes. Problem is that the link code is not anywhere in the source of the page, it's only shown on the screen.
I know how to put php in javascript, but not javascript in php.
Is it possible to echo the form output in php?
However, it sounds as if you could do what you are after with just JavaScript? Or just use PHP, and no JavaScript?
...used javascript for the forms...
The programmer was perhaps trying to prevent form spam? However, for general accessibility it is probably better to use PHP and incorporate several 'spam traps'. A great discussion on form spam recently in the HTML forum [webmasterworld.com].
However, you could still create your IFRAME element with JavaScript, assign the SRC attribute to the link you have generated and append your IFRAME to the document/page?