Iffy Links

Discussion in 'Software' started by smithr2, Jun 22, 2004.

  1. smithr2

    smithr2 Private E-2

    Hi members,

    I'm working on a website at work and I have some links that work when they want to work. I can try the link 10 times and 8 of 10 it works. However, I need the links to work all the time. The links are on a drop down menu bar that is generated by java script code from a different file. When the links work they show up with an address that I put in, but when they don't work the show up with another address that don't make since. The links are the same in the java script code and the html code. Please help!!! I am at my witts end. Thanks in advance for any help anyone may offer.
     
  2. Kodo

    Kodo SNATCHSQUATCH

  3. goldfish

    goldfish Lt. Sushi.DC

    If you were to show you what you mean, I might be able to help.

    Have you tried using an onClick behaviour for it?
    So instaed of <a href="blah.htm"> use <a href="blah.htm" onClick="window.location = 'blah.htm';">
     
  4. smithr2

    smithr2 Private E-2

    Below is the URL for one of the links that are iffy. The first is the URL that appears when the link does not work, and the second is the URL when the link does work. What's happening?

    W:\departments\hr\documents\esp_overview_081202.pdf

    W:\ifc-onsi_development\departments\hr\documents\esp_overview_081202.pdf
     
  5. Kodo

    Kodo SNATCHSQUATCH

    any particular reason why you're pointing to a drive and not just using HTTP for this? Sounds like your structure of your site needs some work.
     
  6. goldfish

    goldfish Lt. Sushi.DC

    I am so confused!! :confused:

    You just gave me a link to two PDF documents that look like that they are on your network...

    Unless I'm sitting at your office I cant get to them I'm afraid :)

    And also you dont use HTML in PDF documents... so im even more confused!
     
  7. smithr2

    smithr2 Private E-2

    The website is on our test server right now... it has not been published yet. The W drive is where I built the site and where all the files are at right now.
     
  8. smithr2

    smithr2 Private E-2

    Goldfish,

    I just wanted you to see the addresses the come up when you select a given link. The one that works and doesn't work. I know that you can't open the links because like you said they are on my drive here at work.
     
  9. goldfish

    goldfish Lt. Sushi.DC

    Aha! I have it! \ is a reserved charachter in javascript. if you put a \ before a " then it will put a " into the string, rather than ending it. to put a \ into the string, put two instead. so

    W:\\ifc-onsi_development\\departments\\hr\\documents\\esp_overview_081202.pdf
     
  10. smithr2

    smithr2 Private E-2

    I'll try it. Now that I think about it... I am only having problems with the PDF files. My other links seem to work. Is that something screwy about PDF files?
     
  11. goldfish

    goldfish Lt. Sushi.DC

    Quite possibly. It might be that it takes a while for the page to lordue the PDF documents... or the browser isnt loading the documents correctly.
     
  12. smithr2

    smithr2 Private E-2

    Attached is a portion of the source code and an example of the menu. Maybe I have an error in the code. It's obviously getting the wrong link from somewhere.
     

    Attached Files:

  13. Kodo

    Kodo SNATCHSQUATCH

    You're still going about this the wrong way. Test server or not, you should be doing this via HTTP and not a mapped drive that the client "uses".
     
  14. goldfish

    goldfish Lt. Sushi.DC

    Agreed. You should have a test web server on the clients server, ideallly, so you can access all the documents you need.

    Did you write that code yourself? I'm quite sure that JavaScript could be done in a LOT less code than that.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds