Anyone that can help me with CSS/Javascript? Please.

MicGrez

Regular Member
Joined
Aug 11, 2011
Messages
387
Reaction score
114
I have trying to fix this for like 2hours now...

Code:
if ( $.cookie("fb-lk") && $.cookie("fb-sh") ) {      $("#multistep-proceed").fadeTo(300, 1).prop("disabled", false).attr("onClick", "loadGTW()");
    }
  } multistep_check();


  function loadGTW () {
    alert('downloadbutton');
  }


  // <-
  </script>

The function loadGTW is somehow supposed to load my content locker on click. But I just get an alert.. The content locker has a css trigger called .downloadbutton

Anyone knows how to get this going? I have the content locker code in the header..

<script type="text/javascript"
src="http://XXXX.XXX/tyf4g4/locker.js?guid=44fe77af7dd7b265">
</script>
 
The function loadGTW is somehow supposed to load my content locker on click. But I just get an alert..

According to the code you pasted, that 's the only thing it does - display an alert.
 
According to the code you pasted, that 's the only thing it does - display an alert.

haha, what can I do to make it call my javascript code? :S
 
The reason you're getting an alert is because you're calling "alert" in the loadGTW() function. You'll never show content that way, just a popup with text.

Without seeing more of the code, I'm not sure what to tell you, but that's the source of the problem. You need to call something else to show the .downloadbutton class (or whatever you're trying to show - a button, the locker gateway itself, etc.) - .show() (jQuery) comes to mind, but that may not be correct for the locker
 
The reason you're getting an alert is because you're calling "alert" in the loadGTW() function. You'll never show content that way, just a popup with text.

Without seeing more of the code, I'm not sure what to tell you, but that's the source of the problem. You need to call something else to show the .downloadbutton class (or whatever you're trying to show - a button, the locker gateway itself, etc.) - .show() (jQuery) comes to mind, but that may not be correct for the locker

hmm okay. I am basically just trying to trigger the css selector for my locker.

3988ae64acc487dc84a9f866c04ca3f7.png


The script ends like this:

530bfc53f033e1ec53aca5435168e486.png

The button that get enabled should call javascript onclick.

6242595fbc9357015f3c102792409136.png
 
The enabled button will call onclick() if you're passing something to that function.

As was already mentioned, calling alert('downloadbutton') is only going to fire an alert pop-up that says "downloadbutton."

So if you have
Code:
<!-- XHMTL -->
<input type="button" name="enable_me" value="Click to Proceed" />
<!-- or HTML5 -->
<button name="enable_me">Click to Proceed</button>

you still need to add the "onclick" function:

Code:
<!-- XHMTL -->
<input type="button" name="enable_me" value="Click to Proceed" onclick="loadGTW();" />
<!-- or HTML5 -->
<button name="enable_me" onclick="loadGTW();">Click to Proceed</button>

BUT...that won't fix your alert problem. You're going to have to modify loadGTW() to do whatever it is you want to run (I'm assuming that's your content locking).
 
Back
Top