location.href, a popup and frames

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Geerdink

    #1

    location.href, a popup and frames

    i made myself a guestbook. when people want to write in it, a pop-up appears
    with the form. now this is what i want to happen when they wrote in it:

    the pop-up has to close itself ( self.close() ? ) and the guestbook page has
    to refresh itself in a frame called 'inhoud'...

    can somebody help me pls ?


  • kaeli

    #2
    Re: location.href, a popup and frames

    In article <cbgrs2$9f0$1@n ews4.tilbu1.nb. home.nl>, hlfskjf@fjslfj. com
    enlightened us with...[color=blue]
    > i made myself a guestbook. when people want to write in it, a pop-up appears
    > with the form. now this is what i want to happen when they wrote in it:
    >
    > the pop-up has to close itself ( self.close() ? ) and the guestbook page has
    > to refresh itself in a frame called 'inhoud'...
    >
    > can somebody help me pls ?
    >
    >
    >[/color]

    opener.reload(t rue);
    self.close();

    Assuming the 'inhoud' frame was the window that opened the popup.

    --
    --
    ~kaeli~
    No one is listening until you make a mistake.



    Comment

    • Chris Geerdink

      #3
      Re: location.href, a popup and frames

      Here is the script of my guestbook. its a combo between php and javascript.
      de $query inserts the data in the mysql database. and then the window has to
      close itself... but it wont work :(

      else
      {
      $query1 = mysql_query("IN SERT INTO gbook (naam, email, text) VALUES
      ('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
      ?>
      <script language="JavaS cript">
      <!--
      opener.reload(t rue);
      self.close();
      //-->
      </script>
      <?
      }

      And here is the javascript of how i open the popup window. maybe that can
      help

      <script language="JavaS cript">
      <!--
      function popup(url)
      {
      window.open(url , 'Gastenboek', 'scrollbars=yes ,height=400,wid th=400')
      }
      //-->
      </script>



      ----- Original Message -----
      From: "kaeli" <tiny_one@NOSPA M.comcast.net>
      Newsgroups: comp.lang.javas cript
      Sent: Friday, June 25, 2004 3:23 PM
      Subject: Re: location.href, a popup and frames

      [color=blue]
      > In article <cbgrs2$9f0$1@n ews4.tilbu1.nb. home.nl>, hlfskjf@fjslfj. com
      > enlightened us with...[color=green]
      > > i made myself a guestbook. when people want to write in it, a pop-up[/color][/color]
      appears[color=blue][color=green]
      > > with the form. now this is what i want to happen when they wrote in it:
      > >
      > > the pop-up has to close itself ( self.close() ? ) and the guestbook page[/color][/color]
      has[color=blue][color=green]
      > > to refresh itself in a frame called 'inhoud'...
      > >
      > > can somebody help me pls ?
      > >
      > >
      > >[/color]
      >
      > opener.reload(t rue);
      > self.close();
      >
      > Assuming the 'inhoud' frame was the window that opened the popup.
      >
      > --
      > --
      > ~kaeli~
      > No one is listening until you make a mistake.
      > http://www.ipwebdesign.net/wildAtHeart
      > http://www.ipwebdesign.net/kaelisSpace
      >[/color]


      "Chris Geerdink" <hlfskjf@fjslfj .com> schreef in bericht
      news:cbgrs2$9f0 $1@news4.tilbu1 .nb.home.nl...[color=blue]
      > i made myself a guestbook. when people want to write in it, a pop-up[/color]
      appears[color=blue]
      > with the form. now this is what i want to happen when they wrote in it:
      >
      > the pop-up has to close itself ( self.close() ? ) and the guestbook page[/color]
      has[color=blue]
      > to refresh itself in a frame called 'inhoud'...
      >
      > can somebody help me pls ?
      >
      >[/color]


      Comment

      • kaeli

        #4
        Re: location.href, a popup and frames

        In article <cbjm2s$4r3$1@n ews1.tilbu1.nb. home.nl>, hlfskjf@fjslfj. com
        enlightened us with...[color=blue]
        > Here is the script of my guestbook. its a combo between php and javascript.
        > de $query inserts the data in the mysql database. and then the window has to
        > close itself... but it wont work :([/color]

        'It doesn't work' is a bit of a general statement.
        Does it throw an error?
        Does anything happen at all?
        [color=blue]
        >
        > else[/color]

        Where is this PHP code?
        It needs to be in a syntactically valid HTML document between the <body>
        and </body> tags for the javascript to run.
        [color=blue]
        > {
        > $query1 = mysql_query("IN SERT INTO gbook (naam, email, text) VALUES
        > ('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
        > ?>
        > <script language="JavaS cript">[/color]
        <script language="javas cript" type="text/javascript">

        If it still won't close the window, look at the HTML source of the popup
        and post it here (view source). The php runs on the server. I don't care
        what it says. Only what the browser sees matters here. ;)


        --
        --
        ~kaeli~
        Can you be a closet claustrophobic?



        Comment

        Working...