Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. running javascript

running javascript

Scheduled Pinned Locked Moved ASP.NET
csharpjavajavascriptasp-netdocker
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ABBASI_RA
    wrote on last edited by
    #1

    hi friends i write a java script code for star rating in a asp.net webpage. it works correctly in OPERA browser but its not working in IE that i make my pages for IE 6.0 this its url address: http://avval.ir/Result.aspx?WordKey=Hynix&Degree=0&SearchPoint=330 Script code: ------------------------------------------- function RateIt(IDC,NameC) { var windowAttribs = "width=225 px, height=20 px, left=350, top=200"; var Url="rate.aspx?IDC="+IDC+"&NameC="+NameC; window.open(Url,"Rate It...",windowAttribs); } ---------------------------------------------- Page Code: ============================ ','<%# DataBinder.Eval(Container.DataItem, "Title2") %>')" style="cursor:hand" src='<%# DataBinder.Eval(Container.DataItem, "Rate") %>'> ============================== whats problem? thanks

    G 1 Reply Last reply
    0
    • A ABBASI_RA

      hi friends i write a java script code for star rating in a asp.net webpage. it works correctly in OPERA browser but its not working in IE that i make my pages for IE 6.0 this its url address: http://avval.ir/Result.aspx?WordKey=Hynix&Degree=0&SearchPoint=330 Script code: ------------------------------------------- function RateIt(IDC,NameC) { var windowAttribs = "width=225 px, height=20 px, left=350, top=200"; var Url="rate.aspx?IDC="+IDC+"&NameC="+NameC; window.open(Url,"Rate It...",windowAttribs); } ---------------------------------------------- Page Code: ============================ ','<%# DataBinder.Eval(Container.DataItem, "Title2") %>')" style="cursor:hand" src='<%# DataBinder.Eval(Container.DataItem, "Rate") %>'> ============================== whats problem? thanks

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Standard question #1: What do you mean by "not working"? Remove "px" from the width and height of the attributes. Does the IDC or NameC contain any characters that may be illegal in a Javascript string or in an URL? To handle any characters you would have to first url-encode the strings to make them valid for the URL, then replace \ by \\ and ' by \' to make them valid in a Javascript string. Unless the <%# tag is html-encoding the text, you would have to do that to. --- b { font-weight: normal; }

      A 1 Reply Last reply
      0
      • G Guffa

        Standard question #1: What do you mean by "not working"? Remove "px" from the width and height of the attributes. Does the IDC or NameC contain any characters that may be illegal in a Javascript string or in an URL? To handle any characters you would have to first url-encode the strings to make them valid for the URL, then replace \ by \\ and ' by \' to make them valid in a Javascript string. Unless the <%# tag is html-encoding the text, you would have to do that to. --- b { font-weight: normal; }

        A Offline
        A Offline
        ABBASI_RA
        wrote on last edited by
        #3

        did you see the page? (in IE and Opera) it works in Opera and also works on my computer (local) but the script code fail when run in IE. i confuse why it works on my computer with IE browser but fail when deploy it on host server.

        G 1 Reply Last reply
        0
        • A ABBASI_RA

          did you see the page? (in IE and Opera) it works in Opera and also works on my computer (local) but the script code fail when run in IE. i confuse why it works on my computer with IE browser but fail when deploy it on host server.

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Ok, I looked at the page. As there are hardly more than three words in the entire page that I am even able to distinguish as words, I have no clue what so ever what the page is supposed to do, or what I should do to reproduce any problems that you may have with it. So, can you now explain what you mean by "not working"? --- b { font-weight: normal; }

          A 1 Reply Last reply
          0
          • G Guffa

            Ok, I looked at the page. As there are hardly more than three words in the entire page that I am even able to distinguish as words, I have no clue what so ever what the page is supposed to do, or what I should do to reproduce any problems that you may have with it. So, can you now explain what you mean by "not working"? --- b { font-weight: normal; }

            A Offline
            A Offline
            ABBASI_RA
            wrote on last edited by
            #5

            thanks for your attention the page is persian. you just click on stars pic.(in the middle column) and a new dialog page must open. when i do it in an Opera browser target page appear but when i do it with IE an "Error on page" appear in statusbar and the target page dosnt open.

            G 1 Reply Last reply
            0
            • A ABBASI_RA

              thanks for your attention the page is persian. you just click on stars pic.(in the middle column) and a new dialog page must open. when i do it in an Opera browser target page appear but when i do it with IE an "Error on page" appear in statusbar and the target page dosnt open.

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              The window name that you are using is illegal. Use only alphanumeric characters in the window name. If you had posted the code that you really use, I could have spotted the error instantly... --- b { font-weight: normal; }

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups