Jump to content

How to set URLParameters


Jim Gallagher

Recommended Posts

I'm evaluating uniGUI (looks great!) and saw that we are able to access URL parameters (URLParameters demo).  What I can't find is how to set them.  How do you add parameters (?Key=12345) in code to the URL.  I would like for the user to be able to bookmark the URL, and then be returned to the same state.  Returning to the same state I can handle, but I haven't seen how to modify the URL to include the key information.  Probably something simple and obvious, so thanks and apologies in advance.

 

 

-Jim 

Link to comment
Share on other sites

Please see urlparameters demo. 

 

The URLParameters demo shows how to read parameters, but not set them.  I believe you have to type in the URL in the browser.  I want to set it programmatically, without causing a reload.  Google tells me this is possible with Javascript, at least for hashtags.  If it is possible for parameters, it would allow the user to bookmark the url, for example: http://localhost:8077/?button=BB&edit=AA.  Selecting that bookmark in the browser does restore the state of the button caption and the edit box.  A real-world case would preload a record from a database table, for example.

  

 

Actually, what I would really like to know is how to set and read hashtags for a single page site, as described in this article:

 

http://blog.mgm-tp.com/2011/10/must-know-url-hashtechniques-for-ajax-applications/

 

I've seen this technique work, and it has the advantage of enabling the back-button, and allowing the user to bookmark "states", though of course there is some programming required to use the hashtag for restoring that state.  It could just identify the form to load, in a multi-form site. 

 

I confess that I don't understand the architecture of uniGUI very well, so this may not be possible, but it looks like modifying the URL without reloading is a feature available in Javascript, so doesn't that mean that uniGUI should be able to do this?  My second confession is that I don't know Javascript very well, so everything I'm asking may be complete nonsense.....

 

-Jim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...