Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Mr.Easybb (1587)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Bloodbath (745)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Rukiafan (533)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Dom (513)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
puppycheese (446)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
pedro (330)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Neymar (301)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Hitsu (281)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 
Flora (275)
/post URL Vote_lcap/post URL Voting_bar/post URL Vote_rcap 


/post URL

avatarNewbie JS
Status : No status yet...

Posts : 30
Join date : 2015-01-23
Age : 35
Location : England
Thu 28 May 2015, 04:23
I kinda had a problem with my script. I've written this code

Code:
if(window.location.href.indexOf('post') && jQuery.ajaxSuccess) {
 window.history.back;
}else if(window.location.href.index of('post') && jQuery.ajaxError) {
 console.log('Error when submitting post.');
}else{
 console.log('AJAX condition not found!');
}

I know it doesn't well written because I'm in mobile until Saturday. But somehow it just doesn't work for me, it would redirect to the /post URL as usual. Can you help me? Thank you
BloodbathBloodbath
Status : No status yet...

Posts : 745
Join date : 2013-05-31
Age : 28
Thu 28 May 2015, 12:54
Mainly the syntax error in your else if.
HitsuHitsu
Status : Finished on working fmAPI.

Posts : 281
Join date : 2013-09-09
Age : 25
Location : Indonesia
Fri 29 May 2015, 13:46
Your [ic]indexOf[/ic] Wink it's the wrong one. Try to replace the [ic]index of[/ic].
Sponsored content