Click here to Skip to main content
14,545,256 members
Rate this:
Please Sign up or sign in to vote.
See more:
have tried giving to target it by using  a spanking tag. To calling  it but Its not working I suspected I wrote a wrong code


What I have tried:

I have tried giving to target it by using a spanking tag. To calling it but Its not working I suspected I wrote a wrong code
Posted
Updated 19-May-20 1:17am
Comments
Richard Deeming 19-May-20 8:20am
   
A "spanking" tag? I really don't think you mean to use that word. 🤣

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If you want a javaScript to use the data on your page, form or not, you need to call the javascript function from your page. When you do a "SUBMIT" of the form you're going back to the server with the form data (those that have name='something' attribute). On the server side I personally prefer giving it to php. This will render a new page with whatever content you have built into it.


On your page, you need an "onclick" event and a target file which will be your javascript function. All of the data on the page is accessible. To learn how to do this you need to access the desired data, in general, via DOM. This can be learned about (easy tutorial) here.[^]



   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100