Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic webpage

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
how to get dynamically webpage popping up in perl scripts. i am known to pop up window through link. what i m looking for is u go for puritucular page and will get you popping up another window with html stuff inside.

X-)
 
That's javascript's realm. You can embed javascript in a perl/cgi page easy enough, but you'll have to know the javascript involved. If need be, go to a page that does the required popup, and view the source. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
i know that but how to implement it? do you mean to write hell lot of javascript statements between all print statment... i need some other way
 
Program the javascript as you need it. Put it in it's own file. Open and read that file in your CGI script, and then print it directly to the webpage as it would look if the page had been built with the javascript in it already.[tt]
#CGI script starts, does opening stuff
print '<script language=&quot;JavaScript1.2&quot;>' . &quot;\n&quot;;
open (JAVAFILE, &quot;< /path/to/file.java&quot;) || die($!);
print join('', <JAVAFILE>);
close JAVAFILE;
print '</script>' . &quot;\n&quot;;
#CGI continues, does whatever
[/tt]

or you can just put the javascript in the perl with print statements, each printing out a line of javascript, but it'll look nicer and be easier to maintain if the javascript is kept in it's own file. &quot;If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top