Java Script Help

Hello!
Can any one help me with this script. I want to center my web
page when the
window is opened window.moveTo command helps me to position
the webpage but
how do I find screen size and center it.
<script LANGUAGE="javascript">
window.moveTo(100,2);
window.resizeTo(1024,768)
</script>
Thanks
Dhananjey

Good luck!
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Dhananjey Singh" <[email protected]> wrote in
message
news:[email protected]...
> Thanks !
> It worked well. I am trying to learn CSS, but some how
the application is
> not clear.
> Thanks a lot
> Regards
> Dhan
>
> "Murray *ACE*" <[email protected]>
wrote in message
> news:[email protected]...
>> Why do it that way at all? It's so easy with CSS,
and will still work if
>> js is disabled....
>>
>> It depends on whether you are using absolute
positioning on the page, as
>> to
>> which method might be best, but in either event,
this will work -
>>
>> Change this -
>>
>> </head>
>>
>> to this -
>>
>> <style type="text/css">
>> <!--
>> body { text-align:center; }
>> #wrapper { text-align:left; width:760px; margin:0
>> auto;position:relative; }
>> /* 760px will display on an 800px screen maximized
browser window without
>> */
>> /* horizontal scrollbars. */
>> -->
>> </style>
>> </head>
>>
>> change this -
>>
>> <body ...>
>>
>> to this -
>>
>> <body ...>
>> <div id="wrapper">
>>
>> and this -
>>
>> </body>
>>
>> to this -
>>
>> <!-- /wrapper -->
>> </div>
>> </body>
>>
>> and see if that helps.
>>
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do
so!)
>> ==================
>>
http://www.dreamweavermx-templates.com
- Template Triage!
>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Dhananjey Singh" <[email protected]>
wrote in message
>> news:[email protected]...
>>> Hello!
>>> Can any one help me with this script. I want to
center my web page when
>>> the window is opened window.moveTo command helps
me to position the
>>> webpage but how do I find screen size and center
it.
>>>
>>> <script LANGUAGE="javascript">
>>> window.moveTo(100,2);
>>> window.resizeTo(1024,768)
>>> </script>
>>>
>>> Thanks
>>> Dhananjey
>>>
>>
>>
>
>

Similar Messages

  • Urgent !!! - Java script help for events in adobe form

    Hi ,
    We have requirement  where we have 5 buttons on interactive form which will retrive data from R/3 system .
    1) How can i distingish the event of each button  ?
    For Ex : We have 5 buttons namely , GetPlantcode , GetStatus, SubmittpSAP etc..
    We hav only 2 events on adobe form - Submit to SAP and SAPCheckFields.
    Please let me know some alternative by which i can sent some variable to webDynpro which distinguishes them.
    2) How to set a value for the context variable on button click event ?
    Ex : I have a context node ( data node ) bind to adobe interactive adobe component on a webDynpro application. If i want to set Selectindicator ( value attribute in data Node ) a value on a button click , Please let me know the java script how i can do this.
    Happy New Year for all
    Nanda

    Hi ,
    We found one work around for this. It seems to solve our issue for now.
    Set a text field on adobe and try to set it with some value in each button click. We can get retrived that value in webdypro application through context bind value node to text field.
    Using the value in the value node we have applied different logic in same event submit to SAP.
    Nanda

  • Java Scripting help

    Hello. I am new to java, as well as still somewhat a newbie on mac. I was wondering if there is a free program out there, or on my mac, that would allow me to write java and then check it for errors? Preferably something for slower peeps like me. Also if there is a general javascript library with the basic scripts most commonly used so I can get a better idea of how to write the script? Thanks in advance!

    Hi,
    Go here: Introduction to Apple JavaScript Coding Guidelines
    Java Script Basics
    New to Mac? Getting Started on a Mac
    Switching from Windows? Switch 101
    Carolyn

  • CS5 slideshow java script help please

    My slide show only plays thru once and I would like to have it run more than once..also I have only 8 images and would like to increase this... can someone lend a hand please..  here is the script, it was developed out of dreamweaver suite 8 but now I am in CS5:
    <script type="text/JavaScript">
    <!--
    function MM_timelinePlay(tmLnName, myID) { //v1.2
      //Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
      var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false ;
      if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
      tmLn = document.MM_Time[tmLnName];
      if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
      if (myID == tmLn.ID) { //if Im newest
        setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
        fNew = ++tmLn.curFrame;
        for (i=0; i<tmLn.length; i++) {
          sprite = tmLn[i];
          if (sprite.charAt(0) == 's') {
            if (sprite.obj) {
              numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
              if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
                keyFrm=1;
                for (j=0; j<sprite.values.length; j++) {
                  props = sprite.values[j];
                  if (numKeyFr != props.length) {
                    if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                    else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
                  } else {
                    while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                    if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                      if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                      else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
          } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
          if (fNew > tmLn.lastFrame) tmLn.ID = 0;
    function MM_initTimelines() { //v4.0
        //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
        var ns = navigator.appName == "Netscape";
        var ns4 = (ns && parseInt(navigator.appVersion) == 4);
        var ns5 = (ns && parseInt(navigator.appVersion) > 4);
        var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
        document.MM_Time = new Array(1);
        document.MM_Time[0] = new Array(1);
        document.MM_Time["myhat1"] = document.MM_Time[0];
        document.MM_Time[0].MM_Name = "myhat1";
        document.MM_Time[0].fps = 3;
        document.MM_Time[0][0] = new String("sprite");
        document.MM_Time[0][0].slot = 1;
        if (ns4)
            document.MM_Time[0][0].obj = document["Image1"];
        else if (ns5)
            document.MM_Time[0][0].obj = document.getElementById("Image1");
        else
            document.MM_Time[0][0].obj = document["Image1"];
        document.MM_Time[0][0].keyFrames = new Array(1, 17, 34, 54, 73, 92, 111, 130);
        document.MM_Time[0][0].values = new Array(1);
        document.MM_Time[0][0].values[0] = new Array("../Images/slideshow/1.jpg","../Images/slideshow/2.jpg","../Images/slides how/3.jpg","../Images/slideshow/4.jpg","../Images/slideshow/5.jpg","../Images/sl ideshow/6.jpg","../Images/slideshow/7.jpg","../Images/slideshow/8.jpg");
        document.MM_Time[0][0].values[0].prop = "src";
        document.MM_Time[0].lastFrame = 130;
        for (i=0; i<document.MM_Time.length; i++) {
            document.MM_Time[i].ID = null;
            document.MM_Time[i].curFrame = 0;
            document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    //-->
    </script>

    gayathri_bna wrote:
    Im in a hurry. As a suggestion...find someone locally and pay them to fix your computer.
    This site is for programming java not for fixing computers.

  • Java Script (Help Required)

    We are using the following code in HTML Header of the page
    //replaces the enter key with the tab key
    document.onkeydown = function ()
    if (event.keyCode == 13)
    event.keyCode=9;
    </script>
    We want to execute this code when current Item is not :P3_REMARKS (which is text area)
    Regards
    Jazib

    example of a name of an item
    About Referencing Items Using JavaScript
    When you reference an item, the best approach is to reference by ID. If you view the HTML source of an Oracle HTML DB page in a Web browser, you would notice that all items have an ID attribute. This ID corresponds to the name of the item, not the item label. For example, if you create an item with the name P1_FIRST_NAME and a label of First Name, the ID will be P1_FIRST_NAME.
    Knowing the item ID enables you to use the JavaScript function getElementById to get and set item attributes and values. The following example demonstrates how to reference an item by ID and display its value in an alert box.
    <script language="JavaScript1.1" type="text/javascript">
    function firstName(){   
    alert('First Name is ' + document.getElementById('P1_FIRST_NAME').value );
    // or a more generic version would be
    function displayValue(id){   
    alert('The Value is ' + document.getElementById(id).value );
    </script>
    // Then add the following to the "Form Element Attributes" Attribute of the item:
    onChange="javascript:displayValue('P1_FIRST_NAME');"
    Kind regards,
    Iloon

  • I  need a Java script  help

    I need a javascript that I can put a list of picture urls in and it
    will be
    timed to fade into the next picture. I don't want just a rotating one
    it
    must fade into the next picture to look good. Very easy project

    I don't think you can do fading and rotating of
    images in Javascript anyway.Sounds like one of those godawful Flash thingsthat
    websites make you watch before you can get to the
    useful stuff.I hate those.
    My company's website is rife with them. System
    testing is a major PITA. I can only imagine how
    frustrating it must be for a customer who doesn't
    have broadband.My company also loads up the corporate site with this trash. We don't employ any web developers, so they brought in some "consultants" to do it for us.
    Every time I have to watch it, I'm reminded of the four straight years I went without a pay raise. Turns my stomach.

  • Jquery or java script help

    The website icrossing.com
    What code did they use and where did they put it?  I cant figure this one out??

    This is a very advanced web site.  I can't in good conscience tell you how to copy a Hearst owned web site. 
    All I can tell you is that you must know code fundamentals in order to produce advanced level results.  
    http://w3schools.com/
    Start with something less ambitious -- a basic page layout with a jQuery Slider, for example.
    Nivo Slider
    http://nivo.dev7studios.com/features/
    Nivo Slide Tutorial
    http://nivo.dev7studios.com/support/jquery-plugin-usage/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Sreaming at the top of my lungs for HELP with Java Script problem!

    Hello,
    I have this strange problem that no one seems to know why or how to fix it.Whenever I encounter a web site that has java scripting for anything pop ups or redirects to url's anything that says java script when I mouse over the link my browsers do nothing.That is for explorer 6.0 beta netscape 4.7 and netscape version 6.I have tried in another forum some suggestions but nothing changed even though I am told nothing is wrong with the java scripting.I used to be able to click java script's with all of these browsers but no longer.That was a few months ago.Now to try something new I tried to see if a new browser would work.I now have the latest version of Opera.It did work but using Opera on some sites limits what I can do so it doesn't solve my problem.Then I tried the Sun JavaHot browser it also worked but limits what I can do on some site's.I have Windows 98 & updated most of my dll's etc & my java is version 2 1.3.1.My java script is enabled in Explorer & netscape's & the security is at a minimum level.Please help me figure out why these other browsers work but the other's do not.I want to edit a web site of mine but I can't because of this problem.I am very frustrated by this and need as detailed help as I can get.Anything of a suggestion would be very much appreciated.But I am also not an expert on the working's of a computer so bear with me.
    Brian

    Hi,
    Well I am thinking that if anyone could know something about Java script it would be java developers.But anyways I had the previous version of explorer 5.0 & the java didn't work in it either.Now how weird is this,I opened netscape 4.7 today & the java scripts are suddenly working.This has me scratching my head wondering if my computer is possesed by some force beyond my capability to know...????Weird as it seems though the explorer still will not respond to a java script.
    Brian

  • Java Script Error while deploying a Model with Value Help

    Hi,
    I am using EP 7.0 SP 10.
    I am trying to deploy a model which includes the Value Help for an Input field, and i am trying to deploy this model.
    The model compiles successfully, but gives a Java Script Error while deploying the model,
    ! Error on Page
    When Click on this java script error, it shows that ,
    Line:14985
    Char 1: Error
    object does n't support this property or method.
    code
    URL: <serverhost>/VCRes/WebContent/VisualComposer6.0/bin/223334.htm?24102006.1712.
    The Same model works in dev server, and it fails in the production server.
    Thanks and Regards,
    Sekar

    Hi jakob,
    Thankyou for your quick response.
    I did a basic model with the help of a documentation which i got from this forums.I created a iView and from there i used Bapi "BAPI_SALESORDER ".
    I created a Input Form and a outpot form (table view).I tested model and am able to get the output.but when i try to deploy it is giving me the error.
    And i think am not paring any formulas here.
    Please guide me.
    thanks and regrads
    Pradeep.B

  • Help needed for Time Calc Java Script

    Hi,
    I am trying to create a timesheet in PDF and have hit a speed bump. Is there anyone there who could provide me with a script that calculated the difference between 2 times? (Field2 time)-(Feild 1 Time) = Duration.I am desperate and have tried everything.
    I proccess the payroll for a company and all of the 500 or so timesheets that I received each fortnight are paper copies and I am pulling my hair out. I need to use Adobe forms (We have Adobe Pro 9 and I am using the XML forms, not live cycle) as the serach engine that we use for emails cannot search on excel documents.
    I have no Java script experience and I am getting completely lost in the subject. Any help would be greatly appreciated.
    Thanks anyone who can help at all.
    -Sohnia

    hi friend here example for time calulation start and end time example..<br />just copy and paste then run it ur browser.<br /><br /><HTML><br /><script language="JavaScript"><br /><!--<br /><br />var h1 = 1;<br />var h2 = 2;<br />var days = 0;<br />var m1 = 1;<br />var m2 = 2;<br />var am1 = 1;<br />var am2 = 2;<br />function findtime(h1,h2,days,m1,m2,am1,am2)<br />{<br />var answer = "why";<br />var mdiff = 1;<br />var hdiff = 2;<br />pdays = parseInt(days);<br />ph1 = parseInt(h1);<br />ph2 = parseInt(h2);<br />pm1 = parseInt(m1);<br />pm2 = parseInt(m2);<br />if(am1 == 2 & ph1 < 12) ph1 = ph1 + 12;<br />if(am2 == 2 & ph2 < 12) ph2 = ph2 + 12;<br />if(am1 == 1 & ph1 == 12) ph1 = 24;<br />if(am2 == 1 & ph2 == 12) ph2 = 24;<br />if(am1 == 2 & am2 == 1 & ph2 < 24) ph2 = ph2 + 24;<br />if(am1 == am2 & ph1 > ph2) ph2 = ph2 + 24;<br />if(pm2 < pm1){<br />pm2 = pm2 + 60;<br />ph2 = ph2 - 1;<br />}<br />mdiff = pm2 - pm1;<br />hdiff = (ph2 - ph1) + (pdays * 24);<br />if(hdiff == 0) answer = mdiff + ' minutes';<br />else if(hdiff == 1) answer = '1 hour and ' + mdiff + ' minutes'<br />else answer = hdiff + ' hours and ' + mdiff + ' minutes'<br />return answer<br />}<br /><br />//--><br /></script><br /></HEAD><br /><br /><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><br /><BODY BGCOLOR=FFFFFF TEXT=000000 LINK=0000FF VLINK=800080><br /><br /><div align="center"><table width="950" border="0" cellpadding="0" bgcolor="#899194" cellspacing="0"><br /><br />  <br /><tr><td valign="middle" width="33%"><br /><br /><center><br /><form><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR=#FFFFFF><br /><!--ROW 1--><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR="#B6D4D2"><br /><!--ROW 1--><br /><td colspan=4><br /><center>Time Between Times Calculations - Multiple Days</center><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Required Data Entry<br /></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><br /><td align="center">Start time</td><br /><td align="center"><input type="text" name="hour1" size="5"></td><br /><td align="center"><input type="text" name="minute1" size="5"></td><br /><td align="center"><select name="period1"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><tr><br /><td colspan="3">    Add Complete Interim Days</td><td align="center"><input type="text" name="adays" size="5" value="0"></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><td align="center">End time</td><br /><td align="center"><input type="text" name="hour2" size="5"></td><br /><td align="center"><input type="text" name="minute2" size="5"></td><br /><td align="center"><select name="period2"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan=4 BGCOLOR="#B6D4D2"><br /><input type="button" value="Calculate" <br />onclick="h1=form.hour1.value;<br />h2=form.hour2.value;<br />m1=form.minute1.value;<br />m2=form.minute2.value;<br />days=form.adays.value;<br />am1=form.period1.options[period1.selectedIndex].value;<br />am2=form.period2.options[period2.selectedIndex].value;<br />if(h1 < 0 | h1 > 12) alert('Your start hour is not valid');<br />else if(h2 < 0 | h2 > 12) alert('Your end hour is not valid');<br />else if(m1 < 0 | m1 > 59) alert('Your start minute is not valid');<br />else if(m2 < 0 | m2 > 59) alert('Your end minute is not valid');<br />else form.answer.value=findtime(h1,h2,days,m1,m2,am1,am2);"><br />   <br /><input type="reset" value="Clear Values"><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Calculated Results<br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan="4"><br />Time Difference <input type="text" name="answer" size="40"><br /><tr><td>[email protected]</td></tr><br /></td><br /></tr><br /></table><br /></form><br /></td><br /></tr><br /></table><br /><br /></center><br /></td><br /></tr><br /></table><br /></center><br /><br /></TD><br /></TR><br /></TABLE><br /></BODY> <br /></HTML>

  • Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form

    I have a form (test) that I am creating in Adobe Acrobat Pro 9.
    I need help creating custom Java Script so I can get the desired answer.
    1) There are several questions in each group that require a numerical answer between 0-4
    2) There is a total field set up to sum the answers from all above questions
    3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
    Any help on what Java Script I need to complete this would be greatly appreciated!
    I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
    Thanks in advance.

    Have you tried the "The field is the average of:"?

  • Need flash player 8 and java script enabled to play videos on ipad, need help please.

    need flash player 8 and java script enabled on my ipad in order to view videos.  please help.

    iPads do not directly support Flash.
    You can look for Flash Browsers in the App store for some options to try. Support is not 100%, but maybe one may work for you.  Browsers like Puffin, Skyfire, Photon etc...
    IPads do fully support JavaScript.  Just make sure its turned on under Settings->Safari->Advanced->JavaScript.
    If you require Java, which is completely different to JavaScript, again there are some browsers in the App store that support it.  Search for "Java browsers" in the store.

  • Why do i keep getting Java Script Application saying uninstal and every time i click on my mouse the pop up appears and its sometimes hard to get rid of it. Please help. God Bless

    As soon as I log on to Firefox this pop up appears on the screen saying Java Script Application and under neath it it says uninstal and beside uninstal is a yellow triangle with a exclamation mark inside of it. Every time I click the mouse the pop up reappears over and over. It's really a nuisance and I need your help.The word uninstal is spelled like you see it, even though it's spelled wrong.Thank you and God Bless

    Other users have reported that this is caused by one of their add-ons. I suggest going to the Add-ons page and disabling everything that is not essential, and then restarting Firefox. Hopefully it's not caused by something you really rely on.
    orange Firefox button ''or'' Tools menu > Add-ons
    On the left side, click Extensions
    Then disable as many as possible and restart Firefox.
    Any luck?

  • When I am on facebook I continually get a syntax error message which keeps coming back. I have checked my settings and enabled java script but doesnt help.

    I can access my facebook account with no trouble, but once facebook is loaded I repeatedly get an error message; syntax error. The words 'Java Script application' are in the bar across the top of the message. It comes up many times and completely disrupts what I am doing. I am wondering if ot has something to do with the adverts in the side bar of each page that I open in facebook. If I open FB from Google Chrome I don't get that problem, or in Explorer, but I would rather use Firefox. Help would be apprecitaed, please. Thanks.

    hello, first of all please [https://www.mozilla.org/firefox/update/ update firefox to the latest version]. the errors you're getting are likely coming from the socialfixer addon that you've installed - there's also an updated version of the extension available which fixes these kind of issues: http://socialfixer.com/blog/category/releasenotes/

  • How to enable java script in my Firefox browser? help its urgent.

    how to enable java script in my Firefox browser? help its urgent.

    go to '''about:config''' and search for '''javascript.enabled''' change its value to '''true'''
    *[http://kb.mozillazine.org/About:config about:config]

Maybe you are looking for

  • How to take the back of all the Projects from PWA 2007 to PWA 2012

    I had already created projects in PWA 2007 and i want to take the backup of all the projects in PWA 2013 .how to do that .Please reply soon.

  • Exception = CX_SY_CONVERSION_NO_NUMBER

    Hi, May we ask for your assitance, why we are getting this error: Error analysis: An exception occurred. This exception is dealt with in more detail below . The exception, which is assigned to the class 'CX_SY_CONVERSION_NO_NUMBER', was neither caugh

  • Connecting XI to XI using Idocs

    Hi, I have a scenario where i have a B2B scenario where XI has to connect to another XI. The method to pass data is via IDOCs. Does anyone have experience with a similiar scenario? Thanks,          Udi

  • Embedding a swf

           [Embed(source="roll_over_test.swf")]          public static var Icon:Class; so how would I place this Icon class into a Canvas or on the stage?

  • Audio conforming nightmare - Premiere 2014 - Mac OS 10.9.5 - AVCHD

    We shoot a lot of AVCHD and I've often had audio conforming problems but I think it is actually worse in the latest version. I did a four camera shoot of a guest lecturer yesterday.  I archived all four cards (entire cord structure) and then wisely p