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.

Javascript - syntax

Featured Replies

I have received heaps of help from this forum in the past and so am confident I can get a resolution to my Javascript problem...

In order to produce a sub-summary from my (CDML) query results, I am using a simple Java script to write my FileMaker records on my results page. This is working well. In my results page I have a link that will open a 'details' page in a new window (all good so far). What I would like to do is use a javascript to set the new window properties. I have the script and it works ok outside my system. The problem I am having is with my " and ' (quotes).

Here is a simplified extract of my code;

document.write("<td><a href='[FMP-Field:Precedents::URL,Raw]'>[FMP-Field:Precedents::Title,Raw]</a></td><td><a href = '[FMP-Field:Notes_Link, raw]' target='_blank'>[FMP-Field:Notes_Icon, raw]</a></td></tr>");

If I either add my javascript code into this string such as;

<a href="javascript:window.close('http://www.apple.com','Profile','scrollbars=yes,width=300,height=300')">

or, have my field calculate the string, I end up having issues with the quotes""

Is there a way I can get around this? Help........

Thanks

Halbj

crazy.gif

I call a Javascript Function which opens the new Window.

Good Luck.

Garry

  • Newbies

I work with JSP, especially using the Struts framework, and have minimal experience with Javascript. That said, however, using Java Strings containing quote characters embedded in html pages poses problems if you do not dereference the quote characters using the '' character. Something to try:

<a href="javascript:window.close('http://www.apple.com','Profile','scrollbars=yes,width=300,height=300')">

Again, something to try, nada mas. When quotes are nested you sometimes need to be explicit with the intepreter, else return befuddled!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.