Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CDML/Javascript to solve double-click prbs in FM6

Featured Replies

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

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.

  • Author

Thanks, Adam!

I'll give this a shot.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.