Re: passing variable with Javascript code.. got the answer.
I figured it out - Original Message - From: "Britta Wingenroth (Design Department)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 25, 2000 10:31 AM Subject: passing variable with Javascript code > This is a multi-part message in MIME format. > > --=_NextPart_000_001F_01BFAEA1.784356F0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > I'm having trouble passing a parameter on with a Java code new window = > function. I know this is a really basic question but I'm just learning = > Java... any help would be really appreciated. > > I've got this in the head of the page: > > > function productwindow() > {product=3Dwindow.open("products/1detailtemplate.cfm","Product_Detail","l= > ocation,menubar,height=3D500,width=3D500"); > } > > > and this inside my query: > > > #Product# > > which works fine, but of course I need to pass the variable = > ?Code=3D#Code# along with the search string to the 1detailtemplate.cfm = > page for it to work.=20 > > Thank you very much! > > Britta > > --=_NextPart_000_001F_01BFAEA1.784356F0 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > > > http-equiv=3DContent-Type> > > > > > I'm having trouble passing a parameter = > on with a=20 > Java code new window function. I know this is a really basic = > question but=20 > I'm just learning Java... any help would be really = > appreciated. > > I've got this in the head of = > the=20 > page: > > gt; > > and this inside my = > query: > > href=3D"javascript:productwindow()">#Product# V> > > which works fine, but of course I need = > to pass the=20 > variable ?Code=3D#Code# along with the search string to the = > 1detailtemplate.cfm=20 > page for it to work. > > Thank you very much! > > Britta > > --=_NextPart_000_001F_01BFAEA1.784356F0-- > > -- > Archives: http://www.eGroups.com/list/cf-talk > To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. > -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: passing variable with Javascript code
Britta, Tough to read your code when you send with HTML format, but I think I have your answer below. (I'd wager that HTML messages get ignored by a large number of otherwise helpful folks here, as they're coming across in plain text since the latest embedded script virus scare.) All you need to do is append that variable name and value to the Javascript function URL, like so: Then on your 1detailtemplate.cfm page, get the value with URL.code. You can also pass values with a Javascript form submit function, but I usually find it faster and easier to append URL variables. > This is a multi-part message in MIME format. > > --=_NextPart_000_001F_01BFAEA1.784356F0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > I'm having trouble passing a parameter on with a Java code > new window = > function. I know this is a really basic question but I'm > just learning = > Java... any help would be really appreciated. > > I've got this in the head of the page: > > > function productwindow() > {product=3Dwindow.open("products/1detailtemplate.cfm","Product > _Detail","l= > ocation,menubar,height=3D500,width=3D500"); > } > > > and this inside my query: > > > #Product# > > which works fine, but of course I need to pass the variable = > ?Code=3D#Code# along with the search string to the > 1detailtemplate.cfm = > page for it to work.=20 > > Thank you very much! > > Britta > > --=_NextPart_000_001F_01BFAEA1.784356F0 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > > > http-equiv=3DContent-Type> > > > > > I'm having trouble passing a > parameter = > on with a=20 > Java code new window function. I know this is a really basic = > question but=20 > I'm just learning Java... any help would be really = > appreciated. > > I've got this in > the head of = > the=20 > page: > >