Jump to content

IPB 4.x.x Pages problem


steve00

Recommended Posts

I have tested some html/javascript page outside of IPB software and works 100%

As soon as I add it into IP.Pages (with or without the Suite HTML Wrapper) it never works

All the css and javascript files load (checked that and definitely all there)

Add same code back again outside of IPB and all works as it should

Anyone had this problem before and if so how to fix ?

Link to comment
Share on other sites

20 hours ago, Adlago said:

If you want to send me one of your html page - I'll test it in my test site. then I will write about the result.

its ok, rather not send files

have since found it is something to do with a script ... appears for some reason in my html page there are a few } and { close to the else tag

e.g

                    if (typeof data.prevPageToken === "undefined") {$("#pageTokenPrev").hide();}else{$("#pageTokenPrev").show();}

if I make new line before and after the } then IPB Pages accepts the javascript but still will not run the script (have tried adding before the </body> and still no luck)

however if I make new line before and after the } in my html file (same as IPB Pages) then the script does not work in my html version (outside of IPB)

Link to comment
Share on other sites

22 minutes ago, steve00 said:

i

 


                    if (typeof data.prevPageToken === "undefined") {$("#pageTokenPrev").hide();}else{$("#pageTokenPrev").show();}

Used creates Server error.

 

So work

if (typeof data.prevPageToken === "undefined") {
    $("#pageTokenPrev").hide();
} else {
    $("#pageTokenPrev").show();
}

 

Link to comment
Share on other sites

Just now, Adlago said:

Used creates Server error.

 

So work


if (typeof data.prevPageToken === "undefined") {
    $("#pageTokenPrev").hide();
} else {
    $("#pageTokenPrev").show();
}

 

Not work ... just IPB Pages accepts the code in the 'Content' tab ... still doesn't run though

But if I use that code in my html page (outside of IPB) then it doesn't work at all .. have to go back to the old code e.g. }else{

doesn't make sense to me

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...