Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call javascript function within Qtip?
1st April, 12:04 (This post was last modified: 1st April 12:58 by Meista.)
Post: #1
Call javascript function within Qtip?
How can I achieve the following:

I have a javascript function

I want to call it within the Qtip itself but I need to insert apostrophes within the Javascript function which currently messes up the text: content

Please advise how this will be possible:

..

content: {
text: '<a href="jvoid(0);" onClick="FuncShowHide('ProductSimpleDesc-TxtContainer','ProductSimpleDesc-EditContainer')">Edit</a>'
},

..

Cheers

Paul
(1st April 12:04)Meista Wrote:  How can I achieve the following:

I have a javascript function

I want to call it within the Qtip itself but I need to insert apostrophes within the Javascript function which currently messes up the text: content

Please advise how this will be possible:

..

content: {
text: '<a href="jvoid(0);" onClick="FuncShowHide('ProductSimpleDesc-TxtContainer','ProductSimpleDesc-EditContainer')">Edit</a>'
},

..

Cheers

Paul

I achieved it with putting the hyperlink complete with Javascript within a hidden div then the div is called into the Qtip. Clever Stuff this Qtip.

My Qtip now enables me to swap a DIV of text to DIV containing a textbox where I can edit the text then submit via AJAX - all without leaving or refreshing the page.
Find all posts by this user
Quote this message in a reply
1st April, 14:06
Post: #2
RE: Call javascript function within Qtip?
Don't forget that you can also just escape the single-quotes:
JS Code
content: {
   text: '<a href="j<strong></strong>void(0);" o<strong></strong>nClick="FuncShowHide(\'ProductSimpleDesc-TxtContainer\',\'ProductSimpleDesc-EditContainer\')">Edit</a>'
},
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Position of qTip Modal from call within a tooltip chuuke 1 259 17th January 21:54
Last Post: Craig
  ajax call with dataTable lib hanabadler 0 666 23rd September 03:42
Last Post: hanabadler
  [Solved] How to call javascript function within Qtip? When2Meets2 7 1,099 19th September 16:49
Last Post: Craig
  Ajax call not being made from qtip sz3y1w 1 882 7th September 19:55
Last Post: Craig
  apply is not a function Sunset Bill 2 1,504 27th July 03:49
Last Post: rsn86
  [Solved] Change content in javascript weber 1 1,173 20th June 15:43
Last Post: weber
  Show api function not working occulens 1 688 27th May 17:10
Last Post: Craig
  [Solved] Firefox Debug -> qtip is no function Hesostein 7 6,173 5th March 03:02
Last Post: Aigw3v75d3Z
  Multiple links loading external javascript page Kao006 1 1,428 24th January 18:58
Last Post: Craig
  [Solved] Content from function? AndiHoffi 1 550 11th January 11:32
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)