Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    2
    Member #
    3698
    Hi, I am currently trying to get a pop up window to appear when a link is clicked. The problem is that the link is from a Flash Menu, which is controlled from an XML document. Each link in the XML Menu is as below:

    <MAIN text="Leave a Message" URL="http://fizbox.com/etc" target="_blank"></MAIN>

    So, so far the link opens a new window, but does not resize it. I'm no good with Javascript, but I assume I need it, to make the pop up the size I would like.

    Does anyone know how I can do this / how I can add JS to this piece of code?

    Thanks for any help

    NB: The pop up link is to an external site.

  2.  

  3. #2
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    Well for a start "target=_blank" is HTML, not JS which is why you can't resize it etc etc.

    This script would work...
    Code:
    //in the head of the document...
    <script language="Javascript">
    var open;
    function open(url)
    {
    	new_window=window.open(url,'new_window','height=600,width=800');
    	if (window.focus) {new_window.focus()
    }
    	
    </script>
    
    <!-- in the URL attribute in your XML: -->
    "javascript:open('http://fizbox.com')"
    Hope this helps...

  4. #3
    Junior Member
    Join Date
    Oct 2003
    Posts
    2
    Member #
    3698
    hmmm, well i'm pretty sure I can't do it. I tried adding the JS header, but XML does not recognise the JS hyperlink below:

    <a href="javascriptopUp('http://www.fizbox.com/box.asp?b=1')">LINK TEXT</a>

    Mainly because the XML menu I am using does not use "href" system, intead using < URL="http://www.etc.com" >. Nevermind.

    I think the only way around it is link to a new blank html page, which would contain some JS to resize the window, then have a frame in it which opens the outside page.

    Thanks for the help

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    if you're using XML, you might have to define your XMLNS for the javascript: prefix.

    If you're using Flash, you have to create VBScript events for the flash to target... flash links can't directly call javascript functions.

  6. #5
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Yes they can.
    JR

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Hmm... maybe I'm thinking the other way around? JS can't directly invoke Flash procedures?

  8. #7
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    I doubt it can, but I have certainly used fscommand in flash to call JavaScript functions before.
    JR

  9. #8
    Banned
    Join Date
    Oct 2003
    Posts
    236
    Member #
    3555
    fscommand whats that? when ive called javascript from flash i just put it in the href as usual

  10. #9
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Not sure, I did it ages ago and followed a tutorial. Plus I hardly ever use flash.
    JR

  11. #10
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    FSCommand... i think requires a VBScript buffer to execute JS functions.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com