Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: Javascript security model?

date posted 14th January 2008 19:43

On Monday 14 January 2008 00:49, Tim Pizey wrote:
> Hi,
>
> I am trying to change a frames based javascript tree browser to
> work in a single page, regardless of whether that page is in a frame,
> standalone page or popup window.
>
> To try to get back to basics I wrote the following:
>
>
>
>
> function sayHi() {
> alert("you");
> }
> function init() {
> document.open();
> document.write("Hi");
> document.close();
> }
>
>
>
>
>
>
> when this worked in Konqueror but not in Opera or Firefox I decided I
> needed help.
>
> Both Opera and Firefox say that sayHi is undefined when you click on the
> link, which is displayed in all three.
>
> Pointers to a good reference would be great, as I have googled in vain.
>
Thanks for the feedback.
First error appears to be docuement.open() which deletes all content of
document.
Second error would be returning anything from the href call, this should
return nothing or you navigate to the string.

I should also be setting the window onload, but IE thought that that could be
malicious.

So the result that works in IE, Firefox, Opera and Konqueror:




test

//









cheers
TimP



Messages by Day
January 31st 2008
January 30th 2008
January 29th 2008
January 28th 2008
January 27th 2008
January 26th 2008
January 25th 2008
January 24th 2008
January 23rd 2008
January 22nd 2008
January 21st 2008
January 20th 2008
January 19th 2008
January 18th 2008
January 17th 2008
January 16th 2008
January 15th 2008
January 14th 2008
January 13th 2008
January 12th 2008
January 11th 2008
January 10th 2008
January 9th 2008
January 8th 2008
January 7th 2008
January 6th 2008
January 5th 2008
January 4th 2008
January 3rd 2008
January 2nd 2008
January 1st 2008


Messages by Month
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000