javascript - jquery, replace html on submit -


I have a form that is using a selection list to jump around my site. Using the onclick window.location, the user selects the page and goes to the press and goes to that page.

I need to add a small text box now), and then when they click, they should go to the selected URL, but with the number entered in the [CODE] box. I found out that jquery replaceAll then it gave me the idea of ​​doing this in HTML:

http: //jumptothispage.com/parts/p [CODE] / edit

Http: //jumpptothispage.com/jobs/j [CODE] / edit

When you go, this code [code] is included in that code in all [ CODE] and then selected on that page, e.g.

http: //jumptothispage.com/parts/p123456/edit

http: //jumptothispage.com/jobs/j123456/edit

I am already using jquery on my site so it makes sense to try and use it again.

P> A workaround: Store the code in a cookie , So at least it does not appear to everyone who sees the URL bar. Then in every onclic , fit the URL to send the user to the "right" page.

Or, simply click on the value of your selected option CODE , which means your onclick means "The user has not set up the code yet." When the user types in the code, store it in a variable (in the example below, realcode ), and you can:

  $ ('Select' ('value', $ (l) .attr ('value'). (/ Code / realcode);}} ($ (el) .attr ('value', $); < / Code>   

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -