javascript or php+html form

View previous topic View next topic Go down

grimofdoom
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06

Postgrimofdoom 21/6/2012, 3:55 pm

I know how to make a html form with text box and submit button. But how do i get it to display the stuff from the text box on a another tab as html(the stuff in the text box is held with html page script) page,like the the w3school's "try it yourself" but pops into another tab.
LGforum
LGforum
Moderator
Forum Posts : 77
Member Since : 2011-11-12

PostLGforum 21/6/2012, 7:00 pm

You can do that with JS, which is probably safer.

You can save a reference to a window that you open.
Code:

var new_window = window.open(window properties etc);
new_window.document.write(textbox value);

Sorry that's a bit of a shortened version, i'm in a rush.
But look into window.open method, it allows you to open another window and manipulate it, eg adding html to it from a textbox Wink

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum