Forum Moderators: open

Message Too Old, No Replies

Use a Link to Pass a Variable to a New Window

Having issues with IE of all things, all other browsers work

         

thaedge

11:02 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



I normally am able to hack my way through JS, but for some reason this time I am dead in my tracks.

The code works in FireFox, Mozilla, Opera but not IE - ironic for me.

Here is the code that works everywhere but gives me a "Invalid Argument" in IE. Any Ideas of what simple thing I have overlooked?

<a href="Javascript:OpenFoo('mytext')">

function OpenFoo(gettype)
{
window.open('#request.url#/index.cfm?type='+gettype,'Foo?', 'height=400,width=500,scrollbars=0,menubars=0')
}

Feel free to IM or post here... havent found anything in G or anywhere to point out my flaw.

Thanks to all helpers in advance

adni18

11:06 pm on Dec 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



index.cfm?type='+gettype,'Foo

there is the problem. you forgot " +' "

index.cfm?type='+gettype+','Foo

thaedge

11:19 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



So it should be

window.open('#request.url#/index.cfm?type='+gettype+','Foo?', 'height=400,width=500,scrollbars=0,menubars=0')

Is that correct? That doesnt seem to work either.

thaedge

11:25 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



Oops I got it :) Its friday, time to go home

window.open('#request.url#/index.cfm/?type='+gettype,'foo', 'height=400,width=500,scrollbars=0,menubars=0')

I also had something else in place of foo that wasnt helping me at all.

Thanks