Im working away at a web site in dreamweaver, this webpage can be a catalog structure web site. Im trying to learn how to make the text change every time a different product is definitely clicked on, for instance when image ONE PARTICULAR is clicked on I would like it to say card 1, when image COUPLE OF is clicked on I need it to declare card 2. Does anybody have any suggestions on the right way to accomplish this
php or javascript. probably javascript can be best.
This will depend on if the revolutionary text will appear within the same page (say, as being a tooltip or additional detail) or if using a different page (e. g. a products element page). Javascript with the former, PHP or one more server-side language with the latter. I’m guessing it is the second though.
hmm
People never know. That does sign up for switching pages also, Mini never particular if there needed becoming a page refresh. I’m just guessing so given it was a " record structure". Really varies according to what is wanted, though.
Gives thanks.
Im uncertain how to employ java script however, it seems complex, is there a method to use it in dreamweaver that may be relatively simple. Im not looking for ways to out of doing 6-pack abs, its just that here, where I are at currently I simply need to know where get started on. Can anyone point me within the direction to employ through dreamweaver that can make this wording change to manifest
Just to be certain, Mini, do you want for this text message change to occur within the same page, or after a internet page refresh (different page)
Javascript can be a scripting language. There may be pretty much no other approach to make it apart from hand coding or perhaps using template scripts. On the additional hand, Javascript is just about the simpler languages to educate yourself, is fairly forgiving, and can admittance browser plugins like Firebug that will help you debug it.
If you are willing to find out, check our jQuery, I do think it should ensure you get there fastest.
Indeed, I’d like for that text change to occur about the same page. Thanks with the advice. I definitely would like to learn it, I’m just unsure how fast I’ll be capable to. Thanks for this jQuery link!
Here’s a quick hint if you happen to need it.
HTML DOCUMENT side:
< p id=" dynamic" > Thing Number< /p> < ul id=" items" > < li> < a new href=" #" title=" Thing 1" > It is a first item< /a> < /li> < li> < a new href=" #" title=" Thing 2" > A 2nd item< /a> < /li> < li> < a new href=" #" title=" Thing 3" > A specific thing after that< /a> < /li> < li> < a new href=" #" title=" Thing 4" > As a final point, a fourth item< /a> < /li> < /ul>
It functions the title feature, since it also fits the goal of a tooltip.
And also javascript:
$(function() // give this line be, it tells this code to function when the page can be ready // these is a selector, including in CSS, and also using that selector most of us do a // jQuery selection, and then utilize a click event to it $(" #items li a" ). click(function() var itemname = $(this). attr(" title" ); // gets the house name $(" #dynamic" ). html(itemname); // change your HTML contents of the dynamic field gain false; // terminate the click function ); ); // give this line be
.