Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

CGI.pm help with IE browser

by BigJoe (Curate)
on Jun 14, 2000 at 07:48 UTC ( [id://18040]=perlquestion: print w/replies, xml ) Need Help??

BigJoe has asked for the wisdom of the Perl Monks concerning the following question:

I come to the monks like normal in need of some help. I have a internal page where I work and on the page it has 2 frames Top and Bottom. Top is an html doc that refreshes it self every x seconds. The bottom is a form that is used to write into the top.html file. On the bottom I made a button to pause the top from refreshing. What it does for right now is remove a part of the meta tag <M that causes the top to refresh. I used the CGI.pm to target the top frame. This works in Netscape but it doesn't work with IE.
#!/usr/bin/perl use CGI; $q = new CGI; open(INFILE, "<top.html"); $filesize = -s INFILE; read(INFILE, $wholepage, $filesize); close(INFILE); $wholepage =~s/<M//; print $q->header(-target=>'Top'); print $q->p($wholepage);


Does any one know how to do this same thing in IE?

Thanks
Big Joe

Replies are listed 'Best First'.
Re: CGI.pm help with IE browser
by wonko (Pilgrim) on Jun 14, 2000 at 11:26 UTC
    What You are trying to use is a non-standard, Netscape specific externsion to the HTTP-protocol; IE can't (obviously) handle this adressing technique. What You shoud do is to set the target in the startform call
    print $q->startform(-action=>"whatewer.cgi", -TARGET=>"Top");
    Another way to do it is with javascript:
    <script language=javascript type="text/javascript"> function speciallink(new) { parent.frames["top"].document.location = new; } // --> </script>
    Call it with
    onClick="speciallink('Whatever.cgi')"
    (The script can be used on anything that supports the onClick event)

    I hope this will help ; )

    /Wonko

Re: CGI.pm help with IE browser
by Michalis (Pilgrim) on Jun 14, 2000 at 12:56 UTC
    It's not only IE that doesn't work with this, neither Opera does nor Mozilla. As wonko said, it's Netscape specific. But you could use exactly the same directive in start_html() if you call that later on.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://18040]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found