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.

Results 1 to 3 of 3
  1. #1
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    I've posted another thread that didn't get many replies, and that I partially solved myself. The problem was how to use the "window.open()" function without referring to an URL (but just an image) and at the same time get a title in the titlebar and a statusbar message. I've solved this, but I'd like to add some more text in the statusbar and therfore need it to scroll to be able to show all the text.
    Adding a function inside the openNewWindow- function, didn't work. What I've tried to do now is to make a separate PHP-page containing alle the neccesary JavaScript code to get the statusbar scrolling, and use the thumbnail images on the referring page as submitbuttons inside <form>-tags.

    However, I want to make the new PHP page (that opens with the larger picture and the scrolling statusbar containing pictureinformation) open inside a new window beeing constrained in size. I use the javascript command:
    Code:
    window.open('big_picture.php','height=400,width=450')
    to get the new windowframe, but are unable to figure out how I get it to pass the variables neccesary for the new PHP-page to set title and statusbar information.

    Anybody who knows how to pass variable values using JavaScript?
    What happens now, is that the<form>-tags surrounding the thumbnail images (with additional <input type="hidden"> tags for the variables) opens the "big_picture.php" page fullsize in the parent window, while the popupwindow that opens is empty with exception of the "close"-button and som error messages stating undefined variable 'title' in line.... and so forth.
    S. Rosland

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    u gotta set a target and a js function on the form..

    <form action="big_picture.php" method="post" target="windowName" name="formName" onSubmit="openWin()">
    ...
    </form>

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Thanks!

    That did the trick.
    S. Rosland


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:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com