Results 1 to 3 of 3

Thread: HTML Object Library & Message Box

  1. #1

    Thread Starter
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    HTML Object Library & Message Box

    Hey guys - long time no ask a question

    I'm using the HTML Object Library to navigate a web page and automate a process. A one point a message box comes up asking me if I wish to proceed.

    The message box is generated from the following javascript function which is called by the onClick event of the button:
    Code:
    	function loadExport() {
    		theTransferID = document.detailsForm2.xLayoutLoad.options[document.detailsForm2.xLayoutLoad.selectedIndex].value;
    		if (confirm("Are you sure you wish to load this layout?")) {
    			self.location.href="export.php?xType=orders&xCmd=load&xTransferID="+theTransferID+"&xUsername=Steve&xRandID=782399094";
    		}
    	}
    I can't edit the script part of the page, so i figured I could just change the onclick event to the javascript I wanted and bypass the function, so I changed it to:
    Code:
    onclick='javascript:self.location.href="export.php?xType=orders&xCmd=load&xTransferID=13&xUsername=Steve&xRandID=782399094";'
    but when I click the button - it just hangs, and doesn't load the page.

    Any ideas why? Am I changing the javascript correctly (the TransferID is put is correct btw)

    I could hook the window and press the button through code, but I'd like to do something a little neater if possible.

    cheers


    edit - sidestepped the issue

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: HTML Object Library & Message Box

    Quote Originally Posted by bushmobile
    edit - sidestepped the issue
    Long time no hear from bushmobile....glad to see you are still around.

    How did you sidestep the issue?

  3. #3

    Thread Starter
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: HTML Object Library & Message Box

    Hi Hack!

    I realised since it was just loading a new page (but with the xTransfer parameter set) I could just load that page directly using createDocumentfromURL

    Naturally, I realised this after I'd submitted the question and just as I'd laid down to go to bed - ah well!

Posting Permissions

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



Click Here to Expand Forum to Full Width