Tuesday, June 24, 2008

I am trying to add a required check on my form I ve got the code. The problem now is I need to run a check for attached objects. Sample Below

function formCheck(formobj){
if (file1.attach = false and file2.attached = false;){
var fieldRequired = Array("FirstName"- "LastName" );
var fieldDescription = Array("First Name"- "Last Name");
var alertMsg = "Please Answer the following:\n";
var l_Msg = alertMsg.length;

I need
if (file1.attached = false and file2.attached = false;){
DO THIS CHECK
}else if{
(file1.attached = true and file2.attached = false;){
DO THIS CHECK
}else if{
(file1.attached = false and file2.attached = true;){
DO THIS CHECK
}else if{
(file1.attach = true and file2.attached = true;){
DO THIS CHECK
}
Can Anyone help PLEASE!!!

The Facebook site is showing nothing more than plain text- without the graphic interface. My Javascript is definitely enabled- and this is happening in every browser I ve tried (Mozilla- IE- etc.). Any idea what s going on?

What is up with javascript and parsing spaces in strings?
They are no problem server side with vb- it would seem though that javascript interprets them as end of statement- so what is the ";" for! I am relatively new to javascript but it seems to me that someone should finish the job!
function Init(){
try
{
var page = location.href.split(/\?/);
var params - pair;
params = page[1].split(/&/);
CustID=params[0].replace("CustID="-"");
MenuItem=params[1].replace("MenuItem="-"");
ProdID=params[2].replace("ProdID="-"");
Pkg=params[3].replace("Pkg="-"");
alert(Pkg)
If javascript encounters a space- it breaks execution of the function(this is just one example.

I should have been more specific "string vars" are the problem.
Actually assigning string vars!

As in- is there a Javascript or other function that could allow me to do that?

My coworker and I are having some (read: major) trouble trying to make an image on a web page automatically adjust its size to fit the size of the viewers window.

(FYI: We re both pretty clueless when it comes to web design)

We ve got it so it works fine in Firefox- Safari and IE7- but we can t seem to get it to work in IE6. The funny thing is that if you adjust the size of the window manually- it will work perfectly- it just doesn t do it when you first open the page.

There s probably something wrong with the javascript we re attempting to run. (Keep in mind we re completely untrained and have (mostly) no idea what we re doing.

I realise that IE6 is the digital incarnation of the devil and doesn t like CSS etc- but is there possibly a workaround or IE hack that anyone can think of?

Here s the website: http://www.sa.companioncard.asn.au/index13.html

Cheers guys.

I am trying to loop this code. Can anyone please help me? The code doesn t fit so this is the source of the code.

http://moparscape.org/severstaus.php

Visit that link and please look at the Source. Can anyone please show me how to loop it so it continues to repeat?
var tl=new Array(

"Sorry that I couldn t fetch you that page-"-
"can t find it-"-
"tried a couple times-"-
"nothing helped..."-
"Such things make me quite depressive..."-
"You see- I m just a web server..."-
"one of the most powerfull in the world"-
"...or so I was told..."-
"but yet I fail to get what you want..."-
"Just don t try to blame me- I can t help it"-
"I mean- I don t even know you."-
);
var speed=40;
var index=0; text_pos=0;
var str_length=tl[0].length;
var contents- row;

function stuff()
{
contents= ;
row=Math.max(0-index-7);
while(row<index)
contents += tl[row++] + \r\n ;
document.forms[0].elements[0].value = contents + tl[index].substring(0-text_pos) + "_";
if(text_pos++==str_length)
{
text_pos=0;
index++;
if(index!=tl.length)
{
str_length=tl[index].length;
setTimeout("stuff()"-1000);
}
} else
setTimeout("stuff()"-speed);

}

I am not a Private Sever coder.

No comments: