matthieu
Posts: 5
Joined: Fri Sep 12, 2014 3:06 am

Trigger Change Event From HS Window to Parent Form

Hi,

I'm having a hard time getting around this problem. The following code cannot actually trigger any change (also onblur, onclick) to the parent form.

Code: Select all

// script in hs pop-up window
$('#pfield', parent.document).trigger('change');
Is there any workaround for this? Any help would be greatly appreciated.

Mat
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Trigger Change Event From HS Window to Parent Form

Hi Mat,

Are you using Highslide with objectType = 'iframe'; ?
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
matthieu
Posts: 5
Joined: Fri Sep 12, 2014 3:06 am

Re: Trigger Change Event From HS Window to Parent Form

Hi RoadRash,

Yes. I am using iframe for all highslide initializations.
onclick="return hs.htmlExpand(this, { align: 'center', objectType: 'iframe', width: '800', height: '400' }, null);"

Regards,

Mat
matthieu
Posts: 5
Joined: Fri Sep 12, 2014 3:06 am

Re: Trigger Change Event From HS Window to Parent Form

Already found a solution. This is a matter concerning iFrames which I am using as an objectType in HighSlide.

Instead of:

Code: Select all

$('#pField', parent.document).trigger('change');
or

Code: Select all

$('#pField', parent.document).blur();
the ff script will work on iFrame

Code: Select all

parent.$('#pField').blur();
or

Code: Select all

parent.$('#pField').trigger('onblur');
Probably, this method would also work on onclicks and other events though I still have not tried them yet.

Mat
matthieu
Posts: 5
Joined: Fri Sep 12, 2014 3:06 am

Re: Trigger Change Event From HS Window to Parent Form

I am lost again, where is the Add Post button in here? I forgot how I exactly added a new post :(
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Trigger Change Event From HS Window to Parent Form

If you want to add a post to this thread, click "Post Reply" (left side, above the thread or below the thread).

If you want to start a new thread, go to the index page of Highslide JS Usage questions and click "New Topic."
matthieu
Posts: 5
Joined: Fri Sep 12, 2014 3:06 am

Re: Trigger Change Event From HS Window to Parent Form

There! Got it! Thanks MisterNeutron

Return to “Highslide JS Usage”