[Javascript] Online calculator

Peter Brunone peter at brunone.com
Mon Aug 14 12:51:26 CDT 2006


		If all you're doing is creating some sort of "clickable function trigger", why not use buttons with onclick event handlers?

<input type="button" value="Link Text" onclick="theFunction()" />

Or if you prefer something that looks more like a link, use any other element with an onclick handler, like

<span class="someSuchFormattingClass" onclick="theFunction()">Link Text</span>

Of course you could start with a button and format that as well; really, it's up to you at that point.

				From: "Peter Lauri" lists at dwsasia.com

								Hi,

								Ok, I see. That should not be any problem then. However, that leads to another questions:

								In one site I have some <a href="javascript:theFunction();">Link Text</a>, they will break the code I assume. How should I do when I want to execute some code when someone clicks on a section of a text?

								/Peter

----------------------------------------

												From:

										 javascript-bounces at LaTech.edu On Behalf Of Peter Brunone

								Hi Peter,

   The only time Javascript "breaks" your search engine viability is when it replaces your content and/or links.  Search engines work by following links, indexing the content on each page, and then following the links on each page.  If your links are replaced by Javascript calls, the search engine won't know what to do.
   Since you're just using JS to manipulate numbers within the same page, I can't see this being a problem.  Just make sure that all relevant areas of your site are still linked by traditional means and you should be fine.

Cheers,

Peter

										From

								: "Peter Lauri" <lists at dwsasia.com>

Hi Group, 

								I am going to create an online calculator similar to this one: 

										http://www.pacificteak.com/financials/projections1.htm

								This one is built in flash, but I think that a JavaScript solution would be better. Then my question is: 

								Is it possible to build a calculator like this with JavaScript that does not break the search engines? The reason why I ask is because I always heard that JavaScript can many times break the search engines. 

								Best regards, 

								Peter Lauri 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060814/5ed5b958/attachment.htm>


More information about the Javascript mailing list