Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

CDML/Javascript to solve double-click prbs in FM6


This topic is 7209 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all. I'm trying to solve a problem that's been mentioned previously on this forum, and could use some advice.

The client has a FM6 Unlimited box serving up databases using CDML. One of the databases stops responding to internet requests, though it's still open on the FM6 box. Access to the database through FM6 Unlimited somehow drops, so that a database opened with full privileges will now only have read privs. Strange.

Anyway, what I gleaned from earlier posts is that what's happening is that a user will click on a page element multiple times, thereby sending new requests to web companion and interrupting the previous ones. Web companion then chokes - somehow this must garble the request queue or something. I can get a user to bring the database down on demand, by having him/her click rapidly on an href link.

Earlier fix suggestions involved using javascript to capture the user click and prevent further submission attempts. I'd like to try that.

Unfortunately, I'm unsure how to bury a call to a javascript inside an href, rather than a form submit. The code looks like this:

 <table bgcolor="#990000" width="100%" border=0 cellpadding=4 cellspacing=0>

	<tr><td align="center">

	<a class="atoz" href="FMPro?-DB=CDWord_WordList.fp5&-Format=classmenu.html&-View"><b>Intro/Special Sections</b></a>&nbsp;

	<a class="atoz" href="FMPro?-DB=CDWord_WordList.fp5&-Format=listview.html&-SortField=zi_word_t&-SortOrder=decend&-Op=neq&zu_ApprovedStatus_t=not&u_editionts_t=DOM&z_firstletter_c=0...9&-Max=all&-Find"><b>#</b></a>

	[FMP-ValueList: zi_atoz_t, List=AtoZ]<a class="atoz" href="FMPro?-DB=CDWord_WordList.fp5&-Format=listview.html&-lay=dev&-SortField=zi_word_t&-SortOrder=decend&zu_ApprovedStatus_t===Approved&u_edition_t=DOM&z_firstletter_c=[FMP-ValueListItem]&-Max=all&-Find"><b>[FMP-ValueListItem]</b></a>&nbsp;[/FMP-ValueList]

	</td></tr>

</table>

 

Esentially, this is just a list of 27 chars, a to z. When you click on a letter it quickfinds all the records beginning with that letter in the db.

Do any of you have any suggestions as to how to trigger a javascript when a user clicks on one of these hrefs?

TIA,

Colin Keefe

Posted

Try using <a href="#" onClick="alert('link');">click me</a>

Basically, use the "onClick" function in a link to call a javascript function. If you copy and paste the abovelink, you will see it in action.

This topic is 7209 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.