By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,968 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,968 IT Pros & Developers. It's quick & easy.

calling js into php

chelvan
P: 90
hi
all


i've a js function. i'm trying to call that on php script. before that i just check a condition when the conditions become true, i called that js. but that js function not depended on that condition, it always worked. why?


chel-1
Sep 23 '08 #1
Share this Question
Share on Google+
4 Replies


Markus
Expert 5K+
P: 6,050
I'm sorry but I don't understand your question too clearly.

You're asking me (and others) about something we can't see and, therefore, can't possibly begin to know the problem. Che1, you've been here long enough to know that for us to help you, you need to help us. It's a simple as that.
Sep 23 '08 #2

chelvan
P: 90
I'm sorry but I don't understand your question too clearly.

You're asking me (and others) about something we can't see and, therefore, can't possibly begin to know the problem. Che1, you've been here long enough to know that for us to help you, you need to help us. It's a simple as that.
hi
here my codes

Expand|Select|Wrap|Line Numbers
  1. <script type='text/javascript'><!--
  2. function loadSite(){
  3. window.location ='home.php?$u_n';
  4. }
  5. --></script>
  6.  


then my php here i check
Expand|Select|Wrap|Line Numbers
  1. if($agree =!isset($_POST['t19']) ){
  2. //inserting query
  3. }
  4. else{
  5. echo"<script type='text/javascript'>
  6.                                                                                         <!--
  7.                                                                                         loadSite();
  8.  
  9.                                                                                         -->
  10.                                                                                         </script>";
  11. }
  12.  
on the above php's else block worked always. that not dependent on the condition

thanks

chel-1
Sep 24 '08 #3

Markus
Expert 5K+
P: 6,050
hi
here my codes

Expand|Select|Wrap|Line Numbers
  1. <script type='text/javascript'><!--
  2. function loadSite(){
  3. window.location ='home.php?$u_n';
  4. }
  5. --></script>
  6.  


then my php here i check
Expand|Select|Wrap|Line Numbers
  1. if($agree =!isset($_POST['t19']) ){
  2. //inserting query
  3. }
  4. else{
  5. echo"<script type='text/javascript'>
  6.                                                                                         <!--
  7.                                                                                         loadSite();
  8.  
  9.                                                                                         -->
  10.                                                                                         </script>";
  11. }
  12.  
on the above php's else block worked always. that not dependent on the condition

thanks

chel-1
Is $agree a boolean value? Because that's what
Expand|Select|Wrap|Line Numbers
  1. !isset($_POST['t19'])
  2.  
will return.
Sep 24 '08 #4

chelvan
P: 90
Is $agree a boolean value? Because that's what
Expand|Select|Wrap|Line Numbers
  1. !isset($_POST['t19'])
  2.  
will return.
ya thats checked combobox is checked or not.returns boolean. if checked that will insert something to database. if not i call the javascript. but the javascript work on both condition.


chel-1
Sep 25 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.