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..

Forgot Password?
 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
RSS Feeds


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,282
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
__________________
My webpage: codeinject.org
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

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:07 AM.






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

Content Relevant URLs by vBSEO 3.3.0 RC2