TOPIC:

Changing inner HTML of a section 4 weeks 1 day ago #250211

  • Topic Author
  • shinzan
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
So im in the "after form" portion and i added of QuickForms:
$header .= "Welcome Back, Bobby! ";

echo '<script>JQuery("#lblGreetings").html($header);</script>';


But this never returns "Welcome Back Bobby"

It returns "Greetings" which is the value I assigned to the description of the section "lblGreetings" on the form.

This is far more simplistic than what I'm doing but I'm migrating from classic facileforms over to this and its indicative of the types of things I need to do by changing values of inner htmls.

Clearly I'm making a simple mistake can anyone spot it?

Please Log in or Create an account to join the conversation.

Last edit: Post by shinzan.

Changing inner HTML of a section 4 weeks 1 day ago #250214

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2267
  • Karma: 3
  • Thanks: 210
Hi,

please try this:
echo '<script>JQuery("#lblGreetings").html("Welcome back, Bobbyy!");</script>';

or this:
$header .= "Welcome Back, Bobby! ";

echo '<script>JQuery("#lblGreetings").text('$header');</script>';
Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Changing inner HTML of a section 4 weeks 1 day ago #250218

  • Topic Author
  • shinzan
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Thanks, but
$header .= "Welcome Back, Bobby! ";

echo '<script>JQuery("#lblGreetings").text($header);</script>';

doesn't work, the section still just says "Greetings"

obviously if I hardcode the text it will work
echo '<script>JQuery("#lblGreetings").html("Welcome back, Bobbyy!");</script>';

However I need it to be dynamic so I just made a simple example, so if i can make the simple work i can make the complex work.

Any other suggestions

Please Log in or Create an account to join the conversation.

Last edit: Post by shinzan.

Changing inner HTML of a section [solved] 4 weeks 1 day ago #250219

  • Topic Author
  • shinzan
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Ok so its really just a syntax issue:
echo "<script>JQuery('#lblGreetings').html('$lbl');</script>";

is the ticket just switching over to single quotes to enclose the Jquery call and variable.

Thanks

Please Log in or Create an account to join the conversation.

Last edit: Post by shinzan.
  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.047 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!