SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: PLEASE help!

  1. #1
    SitePoint Member sicle9's Avatar
    Join Date
    Sep 2001
    Location
    nixa,missouri,usa
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PLEASE help!

    i have been working on a short javascript that works fine when the page is opened by itself, but i intended it to be loaded into an iframe, that is in a layer in another htm doc. the problem is when i use the function when its loaded the way i want it (in the iframe in the layer in the other htm doc) the function executes fine, but leaves the cursor in a waiting state when its over the page/iframe/layer. this happens in IE (tested in version 5.00.3315.1000). it seems to work fine in NN 6.1 of all things. is this just possibly a IE bug of sorts?

    here is the script:

    function _1974(a,b,c,d,x)
    {
    document.getElementById(x).src = 'selectionbeadclicked.gif';
    {
    window.open (a,b,"width="+c+",height="+d+",menubar=0,resizable=0,scrollbars=0,status=1,titlebar=0,toolbar=0,left=0,top=0");
    }
    }

    the x var just changes a small icon on the page to another one so you can track links that have been clicked.

    here is how i am calling the function

    <a href="javascript:_1974('3dworx/example.htm','Ex1a','640','480','1a');" >
    <img id="1a" src="selectionbeadunclicked.gif" width="10" height="18" border="0" ></a>

    can someone please check this... i can post an example from my site if that would help

    TIA
    lena lives in berlin
    she likes to smoke puppies
    push it
    cause the code likes it

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is probably a dumb question but why do you have 2 sets of curly braces in your function? instead of:

    function _1974(a,b,c,d,x)
    {
    document.getElementById(x).src = 'selectionbeadclicked.gif';
    {
    window.open (a,b,"width="+c+",height="+d+",menubar=0,resizable=0,scrollbars=0,status=1,titlebar=0,toolbar=0,left=0,top=0");
    }
    }

    why not (sorry, i renamed the paramenters):

    function _1974(sLink,sSection,iWidth,iHeight,iElemendId) {
    document.all(iElemendId).src = 'selectionbeadclicked.gif';
    window.open (sLink,sSection,"width=" + iWidth + ",height=" + iHeight + ",menubar=0,resizable=0,scrollbars=0,status=1,titlebar=0,toolbar=0,left=0,top=0");
    }

    keep us posted.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •