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

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

Recommended Posts

Posted

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

  • Newbies
Posted

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!

This topic is 7485 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.