JavaScripting Help Wanted

Discussion in 'OT Technology' started by DAHTcom, Dec 9, 2003.

  1. DAHTcom

    DAHTcom Guest

    I have a .js file that helps me with some framed pages. When a visitor (for example) searches google for something, and finds a page I have on that topic it links directly to that page. Whereas I WANT the page to appear with the frames around it (not just the content info, but with navigation and pretty pictures and stuff).

    Ive "barrowed" a code from a certian website that does just that. I had absolutely no assistance from java help and tutorial sites, so I am making this code work for me. The code works now, but there is some extra "junk" in the function I will post below that is causing some scripting errors.

    function pageSetup(imgRoot,pathModifier){
      var url;
      if ((navigator.appName == 'Microsoft Internet Explorer') && (navigator.appVersion.charAt(0) >= '4')){
        if (parent != self) {
          if (parent.index.palantir1) {parent.index.palantir1.src = '_images/dragl'+imgRoot+'.gif'};
          if (parent.index.palantir2) {parent.index.palantir2.src = '_images/dragr'+imgRoot+'.gif'};
        } else {
          url = document.location;
          if ( != '?fullscreen') {top.location.replace(pathModifier+'index.htm?'+url)};
    I have tried to "cut out" the part of the code referring to the "imgRoot", but I keep screwing the code up, and the "pathModifier" ends up not working as a cause of it.

    My goal: is to have the code completely ignore the "imgRoot" part of the "pageSetup", and only handle the "pathModifier" as that works now as shown above.

    If any information further is needed, I will try to answer any questions regarding it, thanks for the help.
  2. DAHTcom

    DAHTcom Guest

    I was hoping to maybe figure out how to do it myself with some suggestions. But the topic was moved to the Tech forum instead, so I guess I will take an answer instead...?

    For anyone who helps me, I suppose I could post some b00bies in the b00bies forum for your trouble :)

Share This Page