What location.search does is to set or return the query string variable from the “?” question mark in the current URL. So, taking advantage of it, we are going to edit the iWeb page so that it passes the arguments contained in location.search over to the widget0_markup.html file.
This is how I did it:
Pass the arguments you need in the url as follows:
Open ‘MyPage.html’ with your favorite html editor and find the line that has the code that loads the widget. It should look something like this:
var widget0_htmlMarkupURL = ".//MyPage_files/widget0_markup.html";
Now simply add the following to the end og that line:
so it looks like this:
var widget0_htmlMarkupURL = ".//MyPage_files/widget0_markup.html"+location.search;
That’s it, now you can access the variables arg1 and arg2 within your widget0_markup.html file.