Onno
Posts: 2
Joined: Mon Jun 02, 2014 7:16 am

closing hs pop-up and refreshing parent page

Hi all,

Sorry for starting a new topic on this, but I just can't get it to work.
I use this link to open my highslide window:

Code: Select all

htp.p('<td>'||nvl(r.tk_op,0)||'&nbsp;&nbsp;<a class="noul left" href="'
                    ||apu.siivoolinkkiCSS(apu.kutsu('pisteet','opiskelija',opiskelija))||'"
                    onclick="return hs.htmlExpand(this, {
                    objectType: ''iframe'', width: ''800'',
                    wrapperClassName: ''titlebar'' } )">Pisteet</a></td>
             </tr>
             ');
I have a submit button which reloads the form(shown in my hs window):

Code: Select all

htp.p('<p><button type="submit" name="save" value="Do something" onclick="parent.window.location.reload()">Save grades</button></p></form>');
After that something is saved into my database and the pop-up automatically closes with this:

Code: Select all

htp.p('<script type="text/javascript">
                        parent.window.hs.getExpander().close();          
</script>');
Problem is that refreshing the parent page just doesn't work.

Any help is greatly appriciated!!
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: closing hs pop-up and refreshing parent page

Hi,

After saving to the database you should run the code for refreshing the parent page instead of the code for closing the popup. The popup will automatically be closed when the parent page gets refreshed.
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
Onno
Posts: 2
Joined: Mon Jun 02, 2014 7:16 am

Re: closing hs pop-up and refreshing parent page

Hi,

Thanks for answering! I actually did figure it out myself after awhile.... by means of trial and error :)

Return to “Highslide JS Usage”