Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Programming & Scripting > Problems with a merge of php javascript and java applet..
 Linux Programming & Scripting   C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 11-16-2007   #1 (permalink)
Linux Engineer
 
RobinVossen's Avatar
 
Join Date: Aug 2007
Location: The Netherlands
Posts: 1,192
Send a message via ICQ to RobinVossen Send a message via MSN to RobinVossen
Problems with a merge of php javascript and java applet..

Hello, well I have a small problem.
I aint a PHP/Javascript/HTML/CSS Scripter so I had to do everything with knowledge of other Languages.
The problem is. Well I dont know how javascript/applets act.
So, I wonder now.
How can I make this code work..

Code:
<html>
<head>
	<style type="text/css">
	p#menu {
		position: relative; 
		top: 30px;
		left: 50px;
		z-index: 2;
	} 
	p#applet {
		z-index: 1;
	} 
	</style>
</head>
<body>
<?
if(isset($_SESSION['logged_in']) or 1==1)
{
	if($_SESSION['logged_in'] == 1 or 1==1)
	{
		//DropSmallButton on the TopLeft of the Screen
		echo "<p id=\"menu\"><script src=\"/menu.js\" language=\"JavaScript\" type=\"text/javascript\"></script></p>";
		echo "<p id=\"applet\"><APPLET CODE=\"VncViewer.class\" ARCHIVE=\"VncViewer.jar\"";
		echo "WIDTH=<script language=\"JavaScript\" type=\"text/javascript\">((screen.width)-32)</script>HEIGHT=<script language=\"JavaScript\" type=\"text/javascript\">((screen.height)-32)</script>";
		echo "<PARAM NAME=\"PORT\" VALUE=\"5600\"></APPLET></p>";
		
		echo "WIDTH=<script language=\"JavaScript\" type=\"text/javascript\">((screen.width)-32)</script>HEIGHT=<script language=\"JavaScript\" type=\"text/javascript\">((screen.height)-32)</script>";
		
	}
	
	else
	{
	  echo "Sorry, no Fiddling with data..";
	}
}
else
{
	echo "Sorry, you are not logged in..";
}
?>
</body></html>

I know that this question is like this is homework or that I want somebody to code my thing for me so let me Reform the question.
I have
Code:
echo "WIDTH=<script language=\"JavaScript\" type=\"text/javascript\">((screen.width)-32)</script>HEIGHT=<script language=\"JavaScript\" type=\"text/javascript\">((screen.height)-32)</script>";
I know ive dont something wrong here.
The problem is that is has to be in a PHP block so the echo "" part is ok for sure..
So Then I have:

Code:
WIDTH=<script language="JavaScript" type="text/javascript">((screen.width)-32)</script>HEIGHT=<script language="JavaScript" type="text/javascript">((screen.height)-32)</script>
Well if I see that, I think that should be ok. I mean, (screen.width)-32 is Quite sure that it is what I want it to be right?
But I think that the problem is that I run that in a Applet code.. (Still Following me)

Well, as you can see I analyzed my problem. I just cant find what I do wrong.
Ill bet there is a way easyer way to fix this. But well..

So, can somebody? (the CodeGuru wje_lf for example (I noticed he helps about everybody in the Scripting forums))

Well, Cheers.
Robin

edit:
the "or 1==1" is for debug reasons there
__________________
Linux User: 453003
New Users, please read this..
Google first, then ask..
RobinVossen is offline  

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot play Gamespot videos in swiftfox. joy83 Ubuntu Help 1 06-24-2007 03:59 PM
$diff java javascript jan1024188 Linux Programming & Scripting 3 10-07-2006 06:43 PM

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 08:25 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2