Mac fails on this

Discussion in 'Javascript' started by Mark Anderson, May 25, 2004.

  1. This is fine in IE 5 & 6 on Win, the target I was asked for <g>, but
    breaks in IE5.x and Safari under OSX (line will wrap):
    document.write('<a href="#"
    onClick="getPrevLayout(\'results\',\'preview\',thisPage,document.resultA
    dd.item%RID%A.value); return false;">');

    By dropping a few alerts, I see I'm not getting into getPrevLayout() so
    I guess the Macs are being picky about writing code with code, rather
    than there being an issue with the function being called.

    Any ideas? Am I looking at the wrong issue?

    Regards


    Mark
     
    Mark Anderson, May 25, 2004
    #1
    1. Advertising

  2. Mark Anderson

    Mick White Guest

    Mark Anderson wrote:

    > This is fine in IE 5 & 6 on Win, the target I was asked for <g>, but
    > breaks in IE5.x and Safari under OSX (line will wrap):
    > document.write('<a href="#"
    > onClick="getPrevLayout(\'results\',\'preview\',thisPage,document.resultA
    > dd.item%RID%A.value); return false;">');
    >
    > By dropping a few alerts, I see I'm not getting into getPrevLayout() so
    > I guess the Macs are being picky about writing code with code, rather
    > than there being an issue with the function being called.
    >
    > Any ideas? Am I looking at the wrong issue?


    item%RID%A this is not a proper js variable syntax.

    Try:
    document.forms[\"resultAdd\"].elements[\"item%RID%A\"].value

    Mick


    >
    > Regards
    >
    >
    > Mark
    >
    >
     
    Mick White, May 25, 2004
    #2
    1. Advertising

  3. Mick,

    Thanks. I should have explained that %RID% is a server-side include such
    that "item%RID%A" arrive at the client as "item459A" or such.

    Anyway, I've now fixed it. I just don't know how! Some lurking typo I
    guess.

    Regards

    Mark



    "Mick White" <> wrote in message
    news:uCvsc.245132$...
    > Mark Anderson wrote:
    >
    > > This is fine in IE 5 & 6 on Win, the target I was asked for <g>, but
    > > breaks in IE5.x and Safari under OSX (line will wrap):
    > > document.write('<a href="#"
    > >

    onClick="getPrevLayout(\'results\',\'preview\',thisPage,document.resultA
    > > dd.item%RID%A.value); return false;">');
    > >
    > > By dropping a few alerts, I see I'm not getting into getPrevLayout()

    so
    > > I guess the Macs are being picky about writing code with code,

    rather
    > > than there being an issue with the function being called.
    > >
    > > Any ideas? Am I looking at the wrong issue?

    >
    > item%RID%A this is not a proper js variable syntax.
    >
    > Try:
    > document.forms[\"resultAdd\"].elements[\"item%RID%A\"].value
    >
    > Mick
    >
    >
    > >
    > > Regards
    > >
    > >
    > > Mark
    > >
    > >
     
    Mark Anderson, May 25, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Saunders
    Replies:
    1
    Views:
    703
    John Saunders
    Nov 18, 2003
  2. André
    Replies:
    6
    Views:
    1,459
    André
    Nov 27, 2007
  3. mc
    Replies:
    3
    Views:
    327
    Mark Dickinson
    Jan 12, 2008
  4. Replies:
    2
    Views:
    312
    Grant Wagner
    Dec 23, 2004
  5. dayo
    Replies:
    11
    Views:
    364
    Ilya Zakharevich
    Dec 16, 2005
Loading...

Share This Page