I Need A Platform Check!

Jun 12, 2003

I need to make my site viewable for both PC and Macintosh. For PC the "HV Menu" works very good but it screws up on a Mac. So I've configured "Top Navigational Bar 3 v3.4.1.1b" to work on a Mac.

Both of the menus use SCRIPT REL/SRC-links to external js-files implemented in the HTML-code of the site (that's 1standard I guess). So what I need is a platform-check in the HTML-code that decides wich menu that will show!

Down below I attach the scripts from each menu.

View 13 Replies


ADVERTISEMENT

I Found A Cross Platform Pop Up Script That Centers

Jul 9, 2005

OK, I think I found the perfect cross platform solution for centered popup windows. I found it on the site of Panic.com, I hope Cabel won't mind ;-)

The trick for all problems is to have a JavaScript that distinguishes between different platforms.

Here's the sample page which will bring up - upon click on a link - a pop up of 500 by 300 pixels. I used as link www.apple.com -- just an example.

To have scroll bars, resizability, etc work, simply change the digit "0" to "1" in all 3 ocurrences.

<html>
<head>

<script type="text/javascript" language="JavaScript">
<!--

// POPUP

var isNav4, isIE4, isMac;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? true : false
isNav6 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 5) ? true : false
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? true : false
isMac = (navigator.platform.indexOf("Mac") != -1) ? true : false
}


function popup(url, winWidth, winHeight) {
if (isNav4 || isIE4) {
var screenPosX,screenPosY;
screenPosX = (screen.availWidth - winWidth) / 2;
screenPosY = (screen.availHeight - winHeight) / 2;

if (isNav4 || isNav6) {
window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight+',screenX='+screenPosX+',screenY='+screenPosY+'' );
}

if (isIE4) {
newwin = window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight+',left='+screenPosX+',top='+screenPosY+'');
}
}

else {
window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight+'');
}
}


//-->
</script>
<a href="http://www.apple.com/" onClick="popup('http://www.apple.com/',ò“',âÆ'); return false;">Click here for pop-up</a>
</body>
</html>

View 1 Replies View Related

Upload/read An Xml From A Local Drive Of Any Platform?

Jan 11, 2010

I need to upload/read an xml from a local drive of any platform (linux, windows, mac) and synchronize it with my web server, which will then update my DB. Local xml file path is predefined and stored in my DB. This is part 1.Part 2, I will have to update the sync(ed) xml and replace the file on my local drive.Part 1 and part 2 will execute in sequence when the user click on a "Sync" button after logged in.Here is what I plan to use, PHP, MySQL, Javascript.What I know so far.1. Due to security reasons we cannot dynamically update the value of the input file type. So setting the known file location is not possible.I will like to know if there is anyway we can upload/read & overwrite a xml file without any middleware like adobe air that needs to be pre-installed to any of the platform to achieve what I plan to do?

View 5 Replies View Related

Extract Information Which Is Located In A Predefined Area On The Screen From A Java Platform?

May 21, 2010

Is it possible to extract information which is located in a predefined area on the screen from a java platform?

For example, there is java based platform which I can see on my screen.

This platform contains numbers/letters.

The location of these numbers/letters does not change, i.e. the script would not need to be adjusted if the field, which contains the info, would move.

Lets assume the screen would look like that:

The info between the fields would be clearly separated.

Now I would like to extract the infos from all the fields and paste the info for example in EXCEL so that I can see "Valerie12345" in .xls field A1 / 12.20 in A2 / Love in B1 etc...if that is possible to extract?

View 1 Replies View Related

Retrieve The User Browser And Platform Information - Pass Values To The Html Hidden Form Element?

Jul 16, 2010

i am developing a web application in which i have to retrieve the user browser and platform information. i am using javascript to get this information and tryin to pass these values to the html hidden form element. pasting a brief code from my application.

<body>
<script>
document.mldsform.screen_width.value=screen.width;
document.mldsform.screen_height.value = screen.height;
</script>
<form id="mldsform" action="/QoEMLDS/qoe" method="post">
[Code]...

View 1 Replies View Related

Login Page On Schools Educational Online Platform Doesn't Remember The Login Info?

Dec 22, 2009

In Chrome, the login page on my schools educational online platform doesn't remember the login info. So i made a bookmark with this javascript injection, that fills in the info, and focusses on the 'aanmelden' button (='login' in dutch), so that i only have to press enter to continue. Here's the javascript injection:javascript: ocument.getElementById('username').value='23889493984';document.getElementById('password').value='4 42384985';return false;document.getElementById('login').focus();This works fine but i'd like to make it happen faster. I wish i could let the script be activated instantly when the page loads, so i only have to press enter, or if possible, let the script click the login button itself.

View 19 Replies View Related

Function - Check On A Check Box Another Check Box Appears

Jan 28, 2009

I want a function that when you check on a check box another check box appears.

View 10 Replies View Related

JQuery :: Uncheck And Check (re-check) A Radio Input On Page Load?

Oct 4, 2011

Here is the HTML: [URL] I'm trying to uncheck the selected radio button, then set the value to 1 (Yes), basically overwriting theinitialvalue to 1. I've looked at prop(), val(), and attr(), and just don't know where to start. Should I select $('#set_q157 input') or$('#set_q157 input:radio'), or each individual radio?

Do I need to each them, and check if its checked, then change its value, or is there a way to select all three inputs as just one radial button? It would also need to work if the input has not yet been checked.

View 4 Replies View Related

How To Count Number Of Check Boxes In A Check Box List.

Mar 29, 2006

i have a list of checkboxes, the number of checkboxes is dynamic. All the checkboxes have same name. i am trying to get the length of selected checkboxes.

<input type=checkbox name=name1 value=1>
<input type=checkbox name=name1 value=2>
........ get dynamically.

when i try to get the length in javascript like document.form.name1.length, it works fine if number of checkboxes selected are more than 1, but not for 1.

View 1 Replies View Related

Auto Check Multiple Check Boxes Onclick ?

Mar 11, 2010

I have a code that I got from a tutorial website. The goal is when someone clicks the first check box with the value of yes then the two other sets of check boxes will autmatically be checked for no.

The issue is their are three sets of 2 check boxes each.

So here is my code code I am trying to use

PHP Code:

Here is my form code

PHP Code:

So Ideally when a representative clicks that the customer has three services (clicks the Yes checkbox) all the other checkboxes will default to No.

How I would change the above javascript to do this.

View 1 Replies View Related

Code To Check Quantity For Button, But It Will Not Check For Enter Key?

Nov 9, 2011

I am a php programmer and not a Javascript programmer and I am trying to help a friend out with his shopping cart. The original programmer (who wrote this years ago and is no longer around) has a button that looks up the quantities in the database for the submitted items, and then displays a prompt if you selected a quantity that is less than the minimum purchase amount.The issue is if the user enters a smaller amount than allowed and hits the enter key instead of the "Buy" button, it allows the order.how to use the current code to also check for an Enter key submission.I can handle the PHP and the db lookup for minimum quantities. Here is the page code and the Javascript code.

Code:
<a href="javascript:checkQuantity(document.form<?php echo $formCount; ?>,
<?php echo $row_rsProduct['lotQty']; ?>,

[code]....

View 3 Replies View Related

Check Before Posting The Form (including A Botdetect Check)?

Jul 18, 2009

I have an .asp page for my customers which does just accepts e-mail information and passes this information to another .asp page. But before passing the info, a javascript checks whether the entered e-mail does match some certain rules. Rule1: If any input has been made at all, Rule2: If an "@" sign is there, if the"." is there and so on. upon pressing the submit button, the first rule works but the second rule does not. Could not figure it out why.

[Code]...

It is the function control() which validates the e-mail field. But it just validates whether the e-mail has been entered or not. The second check (with the @ sign) is not being made.

View 1 Replies View Related

Check If Check Box Is Checked On Name Array?

Apr 19, 2010

I'm working a bunch of pre existing code on a CMS. Just after a quick fix. Doing a show/hide thing on a particular div somewhere on the page depending if a checkbox is ticked or not.Currently there is 3 checkboxes that are dynamically added through the CMS. Here's simplified version of the form:

<form id="simplesearch" name="simplesearch">
<input type="checkbox" onclick='showhidefield(this.value)' name="meta_data_array_search_criteria[custom_profile_type][]" value="5" class="input-

[code]....

View 2 Replies View Related

Check If Checkbox Check Dynamically?

Sep 27, 2009

<input type="checkbox" id="priority" /><span class="presult">0 USD</span>

I want when checkbox is checked, the span will have 500 USD. When checkbox is unchecked the span will return 0.This is what I've got, have no idea why not work.

Code JavaScript:
if ($('#priority').is(':checked')) {
$('.presult').text('500 USD');

[code]......

View 1 Replies View Related

Check To See If Check Box Is Checked?

Oct 21, 2010

i need to check to see if my check box is checked, here is my code...

echo "<form id='form1' name='form1' method='post' action='".$href."' onsubmit='return checked_room()'>";
while($row = mysql_fetch_assoc($res))
{

[Code]....

now for some reason i can't get the javascript to work within the function.

View 2 Replies View Related

Select Max 2 Check Box From 10 Check Box?

Jun 5, 2010

How can i select max 2 check box from 10 check box.following code i used for check box

PHP Code:
<input type='checkbox' name='r1[]'  value="<?php echo $bno;?>"?>>

What code can be design in JS

View 4 Replies View Related

Check Box

Jul 23, 2005

Here is my function

<script language="javascript">
document.form.B1.disabled = true;

function changebutton(){
if (document.form.C1.value = "ON"){
document.form.B1.disabled = false;
return true;
}
else {
document.form.B1.disabled = true;
return true;
}
}
</script>

So far it's doing what I want it to do, when the document loads it disables
the button, and when the check value is clicked it would enable the button.
Now here is the problem, when I uncheck the checkbox the button is not
disabled.

View 12 Replies View Related

Way To Check What The URL Bar Is = To?

Oct 10, 2011

Is there a way to check what the URL bar is = to? so if it was equal to [url] it would change something on the page?

View 12 Replies View Related

Way To Add 'CHECK BOX' To Each Of Ads

Sep 3, 2009

I have a site of classifieds ads user is choosing what he want to see/search and then a table is printed on the screen(with all the requested results)Is there a way to add a "CHECK BOX" to each of the ads and the user is checking what he wants to see later on.after he will have a button "see my checked ads" and a page will open with ONLY the ads that he checked before.

View 3 Replies View Related

Integer Check

Jul 23, 2005

What is the best way to validate a field as a positive or negative
integer?

View 9 Replies View Related

Check For Document ID?

Jul 23, 2005

Is there a way for Javascript to check if a document CSS id exist anywhere
on a page, for example, if "bla" exists?

View 2 Replies View Related

Can't Get Checkbox To Check

Jul 23, 2005

I can't get a checkbox to check when the
value of a text field changes to something greater than 0.

<script language=JavaScript>
<!-- Begin
function sel_comm(comm_val)
{
if (comm_val > 0)
{
document.inhouse-f2.add_comm.checked = true;
}
}
// End -->
</script>

<INPUT TYPE="checkbox" NAME="add_comm" ID="add_comm" VALUE="1">
Commission: <INPUT TYPE="text" NAME="item_comm" ID="item_comm"
size="6" onChange="sel_comm(this.value);">

I just don't get why it's not working. I must be missing something,
but I have no idea what. The FORM tag's NAME and ID elements are
"inhouse-f2". What else could it be?

View 4 Replies View Related

Check All Textfields

Jul 23, 2005

I'm building a multi-language PHP/mySQL -site. I'm also building a CMS for the site.

There are 5 languages. In the CMS fields for e.g. english
bodytext are called (id=) 'bodytext_en'.
German looks like 'bodytext_ge', etc.

The '_en' part tells us that it's a textfield for english texts.
How can i check if ALL english fields are filled out, without
defining each and every field separately.
Like:

if(document.(allfields.'_en').value == ''){
alert('Hey!')
};

View 3 Replies View Related

Check All Checkbox

Jan 26, 2006

I'm using the following code for a checkbox that when clicked, either
checks or unchecks a group of checkboxes on a form. The code works
fine, except when there is only one checkbox in the group in which case
the check all checkbox doesn't work at all.

The code working with three checkboxes in a group is as follows, but
remove two of the three and you will see the code stops working:

<script language="javascript" type="text/javascript">
function checkAll( control, cbGroupName )
{
var cbGroup = control.form.elements[cbGroupName], i = 0, cb;
while( cb = cbGroup[i++] )
{
cb.checked = control.checked;
}}
</script>

<form>
Check all
<input type="checkbox" this,'select[]' );" >
<br><br>
<input type="checkbox" name="select[]" value="234">
<input type="checkbox" name="select[]" value="235">
<input type="checkbox" name="select[]" value="236">
</form>

View 2 Replies View Related

How To Check URL Existence ?

Aug 24, 2006

I have the following HTML code which is doing a GET to a page, say
MyUrl.aspx :

<body>
<form name="form1" method="get" action="MyUrl.aspx" id="form1">
<input type="hidden" name="ClickedElement" id="Messenger" />
</form>
</body>

where the the Submit() is done within a javascript function invoked at
onclick on some element.

My question is: How can I prevent form submission when MyUrl.aspx is
not available? The javascript function is:

function Clicked(MyControl)
{
var _CellContent = document.getElementById("Messenger");
_CellContent.value = MyControl.id;
document.form1.submit();

View 25 Replies View Related

IE6/7+Vista Check

Nov 17, 2007

I run a small personal website and I need to check if my client is reaching my site with:

- IE6 || IE7
AND
- Windows Vista

How can I do? The script should work in Firefox too..

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved