PHP - Java Question
hey guys i have this invoice script im doing for my friend and it works until i add the auto suggest function that includes the jquery.js
why is it that when i combine different java scripts it cancel's out another?should i separate all my scripts in different pages and include them??
so basic
<html debug="true"> <head> <title></title> <script type="text/javascript" src="jquery-1.9.1.min.js"></script> <script type="text/javascript" src="jquery-calx-1.1.4.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#calx').calx({ autocalculate: false }); $('#calculate').click(function(){ $('#calx').calx('update'); }); }); </script> <style> input[type="text"]{ width:100%; } td{ padding:5px 10px; } </style> </head> <body> <form id="calx"> <table> <thead> <tr> <td width="268" style="width:250px">Item Name</td> <td width="162" style="width:80px">Price</td> <td width="162" style="width:30px">Qty</td> <td width="168" style="width:150px">Sub Total</td> </tr> </thead> <tbody> <tr> <td><input id="item1" type="text" name="item[]" value=""/></td> <td><input id="price1" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty1" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal1" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price1*$qty1)" /></td> </tr> <tr> <td><input id="item2" type="text" name="item[]" value="" /></td> <td><input id="price2" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty2" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal2" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price2*$qty2)" /></td> </tr> <tr> <td><input id="item3" type="text" name="item[]" value="" /></td> <td><input id="price3" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty3" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal3" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price3*$qty3)" /></td> </tr> <tr> <td><input id="item4" type="text" name="item[]" value="" /></td> <td><input id="price4" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty4" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal4" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price4*$qty4)" /></td> </tr> <tr> <td><input id="item5" type="text" name="item[]" value="" /></td> <td><input id="price5" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty5" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal5" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price5*$qty5)" /></td> </tr> <tr> <td height="39"> </td> <td>Total Price : </td> <td colspan="2"><input id="total" type="text" name="total" value="" data-format="$ 0,0[.]00" data-formula="($subtotal1+$subtotal2+$subtotal3+$subtotal4+$subtotal5)" /></td> </tr> <tr> <td height="29"> </td> <td>Tax1:</td> <td colspan="2"><input id="totaltax1" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100))" /></td> </tr> <tr> <td height="29"> </td> <td>Tax2:</td> <td colspan="2"><input id="totaltax2" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*9.975/100))" /></td> </tr> <tr> <td height="42"><input id="calculate" type="button" value="calculate" /></td> <td>Tax in :</td> <td colspan="2"><input id="totaltax" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100+$total*9.975/100))" /></td> </tr> </tbody> </table> </form> </body> </html> Edited by techker, 11 August 2014 - 05:27 PM. Similar TutorialsHow can i use php in java? code below dont work hdwebplayer({ id : 'player', swf : 'cinema/player.swf', width : '640', height : '360', video : 'cinema/videos/'.$video_name.'', autoStart: 'true' }); I would like to ask after i click ok in a popup window, it will be directed into another page. How to make the pop-up window expand? Hello
My question is not a Vs. type of question. I want to know which language is better to learn when you are a PHP programmer, Java or C++?
I mean from an economic point of view. I already know what Java and C++ can do and how they are different. But my question is that, when you are a PHP programmer, and want to learn a programming language, which is better, Java or C++, from a job point of view?
Edited by mostafatalebi, 10 November 2014 - 02:06 AM. lets say I have a dropdown menu , <select name="adddirector"> <option value="1">add 1</option> <option value="2">add 2</option> <option value="3">add 3</option> . . <option value="20">add 20</option> </select> How do I code it that when I send the value to the actual add page that if it's value 1 , it will echo out 1 textbox and if its 2 , will be 2 textbox and so on? I need to know if there is any standard to estimate the effort to create a page in Java vs PHP.
For example, if we need to build a login page. I understand there are many factors but trying to see if there is any standards to compare these 2 technology in terms of effort
I just posted a topic on here about sorting php array alphabetically, the solution was posted so quick I decided to post this as well and maybe save some of my time. So I have this javascript Quote <html> <head><title>Darkapec Movie Player</title> <script type="text/javascript" src="ss1.js"> </script> </head> <body> <h1>Darkapec Movie Player</h1> <b>Video location :</b> <input type="text" id="id4"/> <input type="button" onclick='ld()' value="Load" /><br/> <div id="id1"></div> <div id="nowt"></div> <script type="text/javascript"> function ld(){ document.write("<html><!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\"http\:\/\/www.w3.org\/TR\/html4\/loose.dtd><html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\"><head><title>Darkapec Movie Player</title><script type=\"text\/javascript\" src=\"ss1.js\"><\/script><script type=\"text\/javascript\" src=\"fun1.js\"><\/script><\/head><body><h1>Darkapec Movie Player<\/h1><br/><embed type=\"application/x-vlc-plugin\" name=\"video1\" id=\"vlc\" autoplay=\"yes\" loop=\"no\" width=\"640\" height=\"480\" target=\""+document.getElementById("id4").value+"\"/><div id=\"nowt\"></div><div id=\"id1\"></div><div id=\"id2\"></div><script type=\"text\/javascript\" src=\"fun1.js\"><\/script><br/><input type=\"button\" onclick='pl()' value=\"Play\" /><input type=\"button\" onclick=\'ps()\' value=\"Pause\" /><input type=\"button\" onclick=\'st()\' value=\"Stop\" /><input type=\"button\" onclick=\'vlc.audio.toggleMute()\' value=\"Mute\" /><br/><b>width :</b><input type=\"text\" id=\"i1\"/><br/><b>height :</b><input type=\"text\" id=\"i2\"/><br/><input type=\"button\" onclick=\'aspectRatio()\' value=\"Adjust Screen\" />"); } </script> <br/> </body> </html> I have put 2 enclosing the code where I would like to implement the following PHP script Quote <?php $dir="/backup/Movies"; $files = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != "index.php" && $file != "New Movies" && $file != "Icons" && $file != "Tv Shows") { $files[] = $file; } } closedir($handle); } sort($files) ?> <form action="listen.php" method="post" name="table"> <select name="Movie"> <p> <?php $tmp = array(); foreach ($files as $file) { $tmp[] = "<option value='$file'>$file</option>"; } echo implode("\n",$tmp) . "\n"; ?> </p> </select> </form> Thanks again for the help Jake I want to use a window.open java script but generate the list of links via phpe <script> function multiWin() { $s=2; while ($s <= 25) { echo '$links[$s]'; $s++; } } </script> I realize the above coding is wrong and it will be inside php so how would I do it correctly? Also I want it to drop a liner after every link. I've played around with this for a few hours now and I am completely lost now. Hello everyone, i have a "bug" i'd like you to see and help me solve if possible. Let me tell you about when the redirection starts. In my script, it checks if the two words you've entered in two boxes, if they match with the two words on the mysql database then send them to /php/userpanel.php if they doesnt send them to /php/loginerror1.php My problem is, that when you've been redirected to ex. /php/loginerror1.php then when you click to a new page in the menu, it sends you to /php/loginerror1.php/index.php /php/loginerror1.php also dont have any design, i think it doesnt load the .css properly. Anyone had this, or anyone knows how to fix it? Thanks Niixie This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=357109.0 I am trying to create a full Scoreboard like the on the EPSN website. (The Red bar that shows the daily scores). So i created a DB called "scoreDB" I have like 30 sample scores in there.
What i want to create is a set of DIVS that will display the scores from the DB entries and refresh the scores every 10 seconds or so.
Righ now i can display the last score entered from the DB. But i can't make it change automaticly. So I started to think and I creted a Java scrip timer(see below)
My Issue i cant figure out how to make it work
Button line i want a divs that will diplay one score at a time and refresh every 10 seconds or so and display the next available record until it shows the last 10 and start diplaying the laters entry again. I will love to hear your sugestions or soluctions.
One DIV Sample below
<div class="score1" id="score1"> <?php mysql_select_db(scoredb) or die ("Couldn't not find DB"); $query = mysql_query("SELECT * FROM results ORDER BY IDResults DESC 1 "); while($row = mysql_fetch_assoc($query)) { $player1 = $row ["Player1"]; $score1 = $row ["Score1"]; $player2 = $row ["Player2"]; $score2 = $row ["Score2"]; echo $player1" . " " . $scr1 . " " . " " . " - " . " " . $player2" . " " . $scr2 ; } ?> </div> <br></br> <script type="text/javascript" src="jQuery.js"></script> <script type="text/javascript"> function countDown(secs, elem){ var element = document.getElementById(elem); element.innerHTML = "Please wait for "+secs+" seconds"; if(secs <1){ clearTimeout(timer); element.innerHTML = '<h2>Tournament is now Open!</h2>'; element.innerHTML += '<a href="#"> Click here now</a>'; } secs--; var timer = setTimeout('countDown('+secs+',"'+elem+'")',1000); } </script> <div id="status"></div> <script type="text/javascript"> countDown(10,"status");</script> <p></p> import java.util.Scanner; public class bijele { public static void main (String[] args) { Scanner in = new Scanner(System.in); int[] neededPieces = {1,1,2,2,2,8}; String[] currentPieces = in.nextLine().split(" "); for (int i = 0; i < 6; i++) { neededPieces[i] -= Integer.parseInt(currentPieces[i]); System.out.print("" + neededPieces[i] + " "); } } }
i have code that i found and modified slightly that pulls data from mysql and plots it on a google map. this works fine as is. what i want to do is change the pin colour depending on a value from mysql. the java is outside of the while loop and i can not get it to work from inside the loop. this line of code changes the pin colour var icon = new google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/red.png", im crap with javascript and sorry if this is better in java forum. any help greatly appreciated Code: [Select] $dbcnx = mysql_connect ("$dbserver", "$dbuser", "$dbpass"); mysql_select_db("$dbname") or die(mysql_error()); ?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Map API V3 with markers</title> <style type="text/css"> body { font: normal 10pt Helvetica, Arial; } #map { width: 700px; height: 600px; border: 0px; padding: 0px; } </style> <script src="http://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script> <script type="text/javascript"> //Sample code written by August Li var icon = new google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/red.png", new google.maps.Size(32, 32), new google.maps.Point(0, 0), new google.maps.Point(16, 32)); var center = null; var map = null; var currentPopup; var bounds = new google.maps.LatLngBounds(); function addMarker(lat, lng, info) { var pt = new google.maps.LatLng(lat, lng); bounds.extend(pt); var marker = new google.maps.Marker({ position: pt, icon: icon, map: map }); var popup = new google.maps.InfoWindow({ content: info, maxWidth: 300 }); google.maps.event.addListener(marker, "click", function() { if (currentPopup != null) { currentPopup.close(); currentPopup = null; } popup.open(map, marker); currentPopup = popup; }); google.maps.event.addListener(popup, "closeclick", function() { map.panTo(center); currentPopup = null; }); } function initMap() { map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(0, 0), zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR }, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL } }); <?php $query = mysql_query("SELECT * FROM poi_example"); while ($row = mysql_fetch_array($query)){ $name=$row['name']; $lat=$row['lat']; $lon=$row['lon']; $desc=$row['desc']; echo ("addMarker($lat, $lon,'<b>$name</b><br/>$name');\n"); } ?> center = bounds.getCenter(); map.fitBounds(bounds); } </script> </head> <body onload="initMap()" style="margin:0px; border:0px; padding:0px;"> <div id="map"></div> </html> i Have this Form
<form action="action_page.php" method="POST"> <div class="form-group"> <label for="email">Email address:</label> <input type="email" class="form-control" id="email"> </div> <div class="form-group"> <label for="pwd">Password:</label> <input type="password" class="form-control" id="pwd"> </div> <div class="checkbox"> <label><input type="checkbox"> Remember me</label> </div> <button type="submit" class="btn btn-default">Submit</button> </form>
And im trying to pass the information into a USER class and print out the result in a action_page.php.
<?php class User { private $password; private $emailAddress; function __construct() { $this->emailAddress = isset($_POST['email']) ? $_POST['email'] : null; $this->password = isset($_POST['pwd']) ? $_POST['pwd'] : null; } function start() { if (empty($this->password) || empty($this->emailAddress)) { throw new Exception("Empty Post not allowed"); } else { echo " Registration Done"; } } }
$register = new User(); if(!empty($_POST)) { $register->start(); }
Then in my action page i try to refernence the Object with
?php include "User.php"; $user = new User(); try { $user->start(); } catch (Exception $e) { echo "Cannot Find account"; }
but it never can do it ? Anyone any ideas ??
Okay, I would like to redirect my page within a specific time using java script: <meta http-equiv="Refresh" content="3;url=<?PHP echo 'progress.php?user=';$session->username?>"> Basically, I would like it to redirect to this: progress.php?user=$session->username. But it redirects to: progress.php?user= Please help, thanks ... I want to id each comment so that where any member response on a comment, the INSERT and the SELECT knows where to display the responses, to what comment the responses belong to. t. it is like creating an id for each comment so the SELECT display each responses below in its messages. but i don't know if it is an html, php or javascript issue to handle below there are two forms, the parent form and the responses form below each comment form, I want the responses to display below each comment to what it belongs too. I have some tables structure problems and some html issues. the javascript is working for the parent comment it is working perfectly but for the second form the responses form it is not displaying below the comments. Code: [Select] <?php $id = $_GET['id']; // this id of the user being commented in the user table I guess I will need that id to identify which user is being commented "profile" that's the id of his profile if (isset($_SESSION['id'])) { $userid = $_SESSION['id']; $username = $_SESSION['name']; } else { // do this } // the userid contains the id and name of the user commenting "the user logged in". if ($_POST['comment_field_1'] != ""){ $comment_field_1 = $_POST['comment_field_1']; $comment_field_1 = stripslashes($comment_field_1); $comment_field_1 = strip_tags($comment_field_1); $comment_field_1 = mysql_real_escape_string($comment_field_1); $comment_field_1 = eregi_replace("'", "&#38;#39;", $comment_field_1); $sql = mysql_query("INSERT INTO comments (mem_id,commented_men_id, the_message,parent_id, message_date) VALUES('$userid','$idc','$comment_field_1', $parent_id now())") or die (mysql_error()); // i guess the $parent_id should be initialize somewhere in the top with a value of 0 or 1 depending weather it is a response or a comment. } // men_id is the field of the $userid, commented_men_id is the field for the commented on, $idc variable etc... if ($_POST['comment_field_2'] != ""){ // responses form field $comment_field_2 = $_POST['comment_field_2']; $comment_field_2 = stripslashes($comment_field_2); $comment_field_2 = strip_tags($comment_field_2); $comment_field_2 = mysql_real_escape_string($comment_field_2); $comment_field_2 = eregi_replace("'", "&#38;#39;", $comment_field_2); $sql = mysql_query("INSERT INTO comments (mem_id,commented_men_id, the_message,sub_commented_id, message_date) VALUES('$userid','$idc','$comment_field_1', $sub_commented_id now())") or die (mysql_error()); // here instead of $parent_id I use field created for responses to tag a comment as a response should be initialize somewhere in the top with a value of 0 or 1 depending weather it is a response or a comment. I am not sure weather I should leave the parent_id variable or come with this new field $sub_commented_id. What do you think? } // men_id is the field of the $userid, commented_men_id is the field for the commented on, $idc variable etc... if (isset($_SESSION['id'])) { if ($_SESSION['id'] == $userid ) { $the_message_form = ' comment (220 char max) <form align="left" id="comment" action="profile.php?id='.$idc.'" method="post" enctype="multipart/form-data" name="message_from"> <textarea type="text" id="text1" name="comment_field_1" rows="3" style="width:97%;"></textarea> <input class="commentinput" name="submit" type="button" value="submit comment" align="left" /> </form>'; } } $sql1 = mysql_query("SELECT id, mem_id, commented_men_id, the_message,parent_id, message_date FROM comments WHERE commented_men_id='$idc' ORDER BY message_date DESC LIMIT 20")or die ( mysql_error () ); $i = 0; while($row = mysql_fetch_array($sql1)){ $j = $i++; $message_id = $row["id"]; $uid = $row["mem_id"]; $the_message= $row["the_message"]; $message_date = $row["message_date"]; $message_date = strftime("%b %d, %Y, %Y %I:%M:%S %p", strtotime($message_date)); $sql_mem_data = mysql_query("SELECT id, name FROM users WHERE id='$uid' LIMIT 1"); while($row2 = mysql_fetch_array($sql_mem_data)){ $uid = $row2["id"]; $ufirstname = $row2["name"]; $ufirstname = mb_strimwidth($ufirstname, 0, 20, '…'); } $messageDisplayList .= ' <table width="100%" align="center" cellpadding="4" bgcolor="#CCCCCC" style="margin-bottom:0.5em"> <tr> <td width="auto" height="auto" bgcolor="#EFEFEF" style="vertical-align:top"><a width="auto" height="auto" title="'.$row2["name"] .' "href="profile.php?id='.$uid .'&name='.$row2["name"].'">' .$user_pic. '</a><br /> </td> <td width="93%" bgcolor="#EFEFEF"><a href="profile.php?id='.$uid.'">' . $ufirstname . ' </a> • <span style="font-size:10px; font-weight:bold; color:#A6A6A6;">' . $message_date . '</span><br /> <p id="only"> ' . $the_message . '</p><span class="comment">•<a style="padding-left:3.5px; color:#0099ff" href ="">Comment</a></span><div class="commentForm"><form align="left" id="bring" action="profile.php?id='. $uid .'" method="post" enctype="multipart/form-data" name="message_from"> <textarea name="comment_field_2" type="text" id="text2" rows="3" style="width:100%; height:30px;"></textarea> <input id="bringinput" name="submit" type="button" value="submit" align="left" /> </form></div> </td> </tr> </table> <br/>'; } $sql_sub_coment = mysql_query ("SELECT id, mem_id, commented_men_id, sub_commented_id, the_message, message_date FROM comments WHERE sub_commented_id='$blabid3' AND sub_commented_id != 0 ORDER BY blab_date DESC LIMIT 20"); while($row3= mysql_fetch_array($sql_sub_coment)){ $$message_id3 = $row3_sub["id"]; $uid3 = $row3_sub["mem_id"] ; $the_message3 = $row3_sub["the_message"]; $message_date3 = $row3_sub["message_date"]; $message_date3 = strftime("%b %d, %Y, %Y %I:%M:%S %p", strtotime($blab_date3)); $sql_mem_data = mysql_query("SELECT id, name FROM user WHERE id='$uid3' LIMIT 1"); while($row4 = mysql_fetch_array($sql_mem_data)){ $uid4 = $row4["category_id"]; $ufirstname2 = $row4["name"]; $ufirstname2 = mb_strimwidth($ufirstname2, 0, 20, '…'); } $$messageDisplayList2 .= '<table width="100%" align="center" cellpadding="4" bgcolor="#CCCCCC" style="margin-bottom:0.5em"> <tr> <td width="auto" height="auto" bgcolor="#FFFFFF"><a width="auto" height="auto" title="'.$row3["name"] .' "href="profile.php?category_id='.$uid4 .'">' .$blabber_pic2. '</a><br /> </td> <td width="93%" bgcolor="#EFEFEF"><a href="profile.php?id='.$uid4.'">' . $ufirstname2 . ' </a> • <span style="font-size:10px; font-weight:bold; color:#A6A6A6;">' . $message_date3 . '</span><br /><p id="submessage">' . $the_message3 . '</p> </td> </tr> </table>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <link rel="stylesheet" href="style/style.css" type="text/css" media="screen" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".commentForm").hide(); $(".comment").bind('click', function(){ $(this).nextAll(".commentForm:first").slideToggle(); return false; }); var html = $("#text1").html(); $(".blabinput").click(function() { console.log("AJAX EVENT OCCURED") $.post($('#comment').attr("action"), $("#comment").serialize(), function(html) { // Find the first table after the form in the HTML from the server and append it to the form on the page. $(html) .find('form + table').insertAfter('#comment').after('<br />'); }); }); var html2 = $("#text2").html(); $(".bringinput").click(function() { console.log("AJAX EVENT OCCURED") $.post($('#bring').attr("action"), $("#bring").serialize(), function(html2) { // Find the first table after the form in the HTML from the server and append it to the form on the page. $(html2) .find('form + table').insertAfter('#bring').after('<br />'); }); }); }); That's what I have so far. the first form the parent form is submitting and posting with the jquery of id #message, then the #bring id for the id of the second form or the response form is not working properly, it is inserting but posting the comment in the p tags with id only., that's where the parent comment post not the response comment form. it should post below but, somehow I have the html and the jquery mess up. Need help in there. the comment text is sliding toggling but the second time I click on, meaning sometimes it won't toggle the first time I click on it. But the main issue now is getting the responses form displaying below and Ajaxing without browser refresh. Hi
I inserted javascript to track google ad conversions inside finalpage.htm which is parte of a major site I which I don’t have access to.
The site manager only allows uploading some .htm pages for customization purposes.
But the scripts are not running anymore.
When I use google label checker plugin to analyse the page, I got the message below:
<script> tag must not be included in a <span>
But the finalpage.htm is a blank page, so there is not <span>
Maybe <span> are coming from a higher level of the website.
Is there I way to prevent this and guarantee my seeing as a real blank page ?
Moises
hello. i have two functions that are not working because i cant seem to input the php and java correctly.. could someone help please. how do i put these lines into a function: 1 - Code: [Select] function applyBox() { echo ' <div id="apply"> <h3><b><span class="arial18_GRN">Apply NOW</span> to become a<br>BusinessMobiles.com Affiliate</b></h3> <p class="applyText">Drive quality traffic to one of our<br>partners and get paid for it.</p> <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Apply','','image/callsToAction/applyButton2.jpg',1)"> <img src="image/callsToAction/applyButton1.jpg" class="applyButton" alt="Apply" name="Apply" width="137" height="36" border="0"></a> </div> '; } this part is not working: onMouseOver="MM_swapImage('Apply','','image/callsToAction/applyButton2.jpg',1)"> i can see that the ' is breaking it. i tried putting .'s but it didn't work : onMouseOver="MM_swapImage('.Apply.','..','.image/callsToAction/applyButton2.jpg.',1)"> 2 - this form: Code: [Select] <div class="form"> <form name="Form" method="post" action="<?PHP echo $_SERVER['PHP_SELF']; ?>"> <input name="submit" type="hidden" value="submit" /></input> <input type="text" class="inputField" name="Uname" id="Uname" value="'.$Uname.'" onfocus="clearUname()"></input> <input type="text" class="inputField" name="PW" id="PW" value="'.$PW.'" onfocus="clearPW()"></input> <input type="image" class="submit" src="image/wrapper/submit.jpg" value="Submit" alt="login" width="36" height="20" border="0" /></input> </form> this part is not working : <form name="Form" method="post" action="<?PHP echo $_SERVER['PHP_SELF']; ?>"> i tried: <form name="Form" method="post" action="'.echo $_SERVER['PHP_SELF'].'"> but no luck. any suggestions ???? thanks ricky Hi all, how would I write a string like this in an echo statement so the javascript runs? <a href="javascript:ajaxpage('test.php', 'content');">test</a> I had Tom Cat Java installed on my Linux sever and I need to call a java file, which isn't working. Someone told me to verify Java is in fact installed on my server using this command: Code: [Select] echo exec('which java'); but when I run it, nothing displays! The java command I'm trying to run is this: Code: [Select] exec('java -Xmx1024m -jar "/home/account/public_html/java -cp b4a_c2dm.jar anywheresoftware.b4a.c2dm.C2DM send $php_device_id \"test\""'); The .jar file is there. My path to java is: /usr/local/jdk/bin/java Thanks for any help... Just wondering if anyone knew of one? I have been looking for ages but can't find what I need. In java: Code: [Select] public class Test { public static void main(String[] args) { System.out.println((byte)0xff); } } Outputs: Code: [Select] -1 I've tried things like <?php $var = pack('H', 0xff); echo $var; ?> But that doesn't output anything |