Javascript help needed if possible

I am trying to combine code from codaslider and shadowbox, but whatever I try, my code is basically rubbish!!
I want to combine the following two links in to one:
<a rel="shadowbox[Mixed];width=640;height=360" href="#">
<a class="xtrig" href="#1" rel="coda-slider-3">
I am fairly certain that all I need to do is combine the two 'rel=' parts of the code to get it working. Basically, what I am trying to do is stop codaslider from sliding when I click and instigate the shadow box. Is it possible?
TIA
Mat

No, it can't be done. JSP code runs before the HTML page is generated; it's a server side technology. JavaScript runs on the client's machine, after the page has been rendered.

Similar Messages

  • Javascript help needed (confirmation for cancel button )

    Hi guys!
    I am not good at javascript but am going to improve shortly :-). Now i need very quick fix.
    I'm using <html:cancel> button in Struts 1.1 and I'm using without thinking the following code:
    <html:cancel onclick="bCancel=true;" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    It is not that important though. I would like very much to alert user on possible loss of data (long multipaged form - could press mistakingly, who knows).
    Would you, please post the javascript code that is needed to accomplish this - just alert and if yes - cancel, no - leave alone?
    I'll really appreciate this.

    Thank you for your response.
    I also manage to write this. Is this correct?
    <script language="JavaScript">
    function ensure() {
    return confirm("Are you sure that you want to cancel this operation?");
    </script>
    <td colspan="3" align="center">
    <html:cancel onclick="bCancel=ensure();" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    </td>

  • Math.min JavaScript help needed

    Hello,
    I am trying to write a script for a fillable PDF in Adobe Acrobat, but I don't have much experience with JavaScript and I need some help!
    Basically I have three fields as follows:
    A1 = a field with a number value in it
    B1 = a field with a number value in it
    C1 = a field where the sum calculation will be.
    I want to write a script that will enter the lesser of the values in A1 and B1 into C1. If no value has been entered into B1, then it enters the value of A1 into C1.
    This is what I have come up with so far:
        // Get the field values, number fields as numbers
        var d1 = getField("A1").value;
        var d2 = +getField("B1").value;
        // Set the field value to either A1 or B1, whichever is lesser
         event.value = Math.min(d1,d2);
    Some of the problems with the script so far are:
    It does not calculate correctly if there is no value entered in B1 (should give just A1).
    It doesn't update the event.value if A1 is changed (until another form field is modified)
    Can anyone help??
    Thanks!

    Adjusted the field calculation order fixed question 2.
    The script given as answer worked great except for one area.
    B1 values can range from 0 and up. If a 0 is entered in B1, then the Math.min ignores it since d2=="".
    I can get around that problem by having a default value set in B1 of -1 (outside of the range). I'd prefer that there not be a default value set.
    Any suggestions? I appreciate the help.

  • If/then JavaScript help needed

    Hello,
    I am trying to write a script for a fillable PDF in Adobe Acrobat, but I don't have much experience with JavaScript and I need some help!
    Basically I have five fields as follows:
    A1 = a checkbox
    B1 = a field with a number value in it
    C1 = a field with a number value in it
    D1 = a field with a number value in it
    E1 = a field where the sum calculation will be.
    I want to write a script that will enter the sum of values of B1+C1+D1 into E1 if the checkbox in A1 is checked yes.
    If it is not checked yes, then it will enter the sum of values of B1+C1+ the value of D1 divided by 2 (and rounded down) into E1.
    Can anyone help??
    Thanks!

    This should do it as the custom Calculate script for E1:
    // Custom calculate script
    (function () {
        // Get the field values, number fields as numbers
        var a1 = getField("A1").value;
        var b1 = +getField("B1").value;
        var c1 = +getField("C1").value;
        var d1 = +getField("D1").value;
        // Set this field (E1) value based on the state of the check box
        if (a1 === "Off") {
            event.value = b1 + c1 + d1;
        } else {
            event.value = b1 + c1 + Math.floor(d1 / 2);

  • Javascript Help Needed Again

    Hi there, I am not very good with Javascript, so was looking
    for some help.
    I have a select list for an order checkout page, which is
    basically how
    people heard about the site. You select one, and depending on
    what it
    is, another form field will appear with a message asking for
    more detail.
    For instance, if they selected Search Engine, another field
    would appear
    with the text "Which search engine" and a form field for them
    to enter
    it into.
    What is the best way to do this? Some of the options in the
    select list
    won't need the additional field.
    Cheers,
    Steve

    Dooza wrote:
    > Dooza wrote:
    >> Hi there, I am not very good with Javascript, so was
    looking for some
    >> help.
    >>
    >> I have a select list for an order checkout page,
    which is basically
    >> how people heard about the site. You select one, and
    depending on what
    >> it is, another form field will appear with a message
    asking for more
    >> detail.
    >>
    >> For instance, if they selected Search Engine,
    another field would
    >> appear with the text "Which search engine" and a
    form field for them
    >> to enter it into.
    >>
    >> What is the best way to do this? Some of the options
    in the select
    >> list won't need the additional field.
    >
    > Ok, I have almost got this sussed, just need some syntax
    help :)
    >
    > function toggleElement(sel1, element1) {
    >
    > element1 = document.cart.elements[element1];
    > //alert(element1.value);
    > if (sel1.value == 'searchenginelisting') {
    > element1.value = 'Which search engine?';
    > element1.style.display = 'inline';
    > }
    > if (sel1.value == 'searchenginesponsored') {
    > element1.value = 'Which search engine?';
    > element1.style.display = 'inline';
    > }
    > if (sel1.value == 'banner') {
    > element1.value = 'Which website?';
    > element1.style.display = 'inline';
    > }
    > else {
    > element1.value = ''; // input text will be empty
    > element1.style.display = 'none'; // hide text element
    > }
    > return;
    > }
    >
    > It currently only works when you select banner from the
    select list.
    > When you select the first 2 it does nothing. Its the way
    its nesting the
    > IFs, can anyone tell me how to sort this out?
    >
    > Cheers,
    >
    > Steve
    function toggleElement(sel1, element1) {
    var element1 = form.elements[element1];
    if (sel1.value == 'searchenginelisting' ||
    sel1.value == 'searchenginesponsored'){
    element1.value = 'Which search engine?';
    element1.style.display = '';
    return;
    if (sel1.value == 'banner') {
    element1.value = 'Which website?';
    element1.style.display = '';
    return;
    element1.value = ''; // input text will be empty
    element1.style.display = 'none'; // hide text element
    Mick

  • Javascript Help Needed to Show/Hide Regions

    version 4.0.2.00.07
    Hello,
    I'm hoping that someone would help me with creating a Javascript function to Show/Hide regions.
    I have a Select List defined as Checkboxes that when clicked I would like to show specific regions that contain fields that are specific to that checkbox selection. There are currently four selections available. There are two selections that would show one region and the other two selections would show the other region.
    Please let me know if I need to clarify anything.
    Thanks,
    Joe

    There is an out-of-box solution that may help you - check out the "Customisation" section in the region properties.
    Otherwise, you might like to explore using a Dynamic Action to show/hide your region based on an event on your relevant checkbox.
    Either way, you should have a declarative solution when you thought you might need to hand-code some javaScript :-)
    ps - thanks for providing your Apex version.

  • Images with hyperlink in javascript - help needed

    Hai,
    I am having two hyperlinks say, "Good Morning" and "Good Evening". When I am clicking "Good Morning", a small arrow or a picture should display with the hyperlink.
    When I am clicking "Good Evening" this one should have the small arrow or a picture and "Good Morning" will be displayed normally (without picture).
    How can I do this using javascript?
    Did anyone has the code? Pls help me.
    <html>
    <head>
    <title>
    Moves the Arrow When Clicked the Headings for Sorting purpose
    </title>
    <SCRIPT language="JavaScript">
    function remove_picture() {
    function set_picture() {
    </SCRIPT>
    </head>
    <body bgcolor="peachpuff" width="90%" align="center">
    <table>
    <tr>
    <td align="left">Good Morning</td>
    <td>Good Evening</td>
    </tr>
    </table>
    </body>
    </html>
    - yogee

    <html>
      <head>
        <style type="text/css">
          #notclicking .highliter {
            display: none;
          #clicking .highliter {
            display: inline;
        </style>
        <script type="text/javascript">
          function showHighliter(elem) {
            elem.id="clicking";
          function hideHighliter(elem) {
            elem.id="notclicking";
        </script>
      </head>
      <body>
        <a href="#" id="notclicking"
           onfocus="showHighliter(this);"
           onblur="hideHighliter(this)">
          <img border="0" class="highliter"
               src="http://forum.java.sun.com/im/duke.gif"/>
          Good Morning
        </a><br/>
        <a href="#" id="notclicking"
           onfocus="showHighliter(this);"
           onblur="hideHighliter(this)">
          <img border="0" class="highliter"
               src="http://forum.java.sun.com/im/duke.gif"/>
          Good Evening
        </a><br/>
      </body>
    </html>

  • Javascript Help needed

    We have a requirement to not display report until the user selects some requirements, and we also need to ensure a user has selected a value for certain prompted columns.
    As such, we have written a custom Javascript for a custom "Go" button on our dashboards. The JS validates the required fields and generates a Go URL which loads into an iFrame when the custom button is clicked. This works fine in Internet Explorer, but in Firefox the prompt values are not being passed into the Go URL string. This is a security risk as it shows all data on the report when it shouldn't for certain users. Can anyone look at the JS code below to see why it won't work in Firefox?
    Thanks
    removed code, sorryEdited by: odinsride on Feb 10, 2011 9:17 AM

    if(navigator.appName == 'Microsoft Internet Explorer')That would be the reason your code doesn't work in Firefox - most of it is inside an IE-only if clause!
    Surely there must be a better way to achieve your requirement rather than to use all that javascript. One technique I've used to force a user to make a prompt selection is to use nonsensical default values on your prompts. By doing this you are guaranteed that the report will give 'no results' when it is first run. You can then add a no results view to the report and add your own custom message saying 'please make some selections from the prompts above'.

  • Help needed if possible!

    Hello, i am new to this forum and to J2ME.
    I am currently in the process of writing a MIDlet to encrypt data using bouncy castle api. I used the bouncy castle tutorial on the IBM website. (IDEA algorithm).
    Everything is working fine in the WTK 2.1 emulator. (I placed the midp_classes.zip file in the lib folder of the project for it to work)
    When i try to deploy the midlet (jar and jad files) on Nokia 6600, i obtain the error message "Authorisation failed" (Authorisation with an S rather than Authorization :) with a Z)
    I am starting to lose hope in the possibility of making this work on a real cell phone... so please any help would be highly appreciated.
    Thanks

    Hello, i am new to this forum and to J2ME.
    I am currently in the process of writing a MIDlet to
    encrypt data using bouncy castle api. I used the
    bouncy castle tutorial on the IBM website. (IDEA
    algorithm).
    Everything is working fine in the WTK 2.1 emulator.
    (I placed the midp_classes.zip file in the lib folder
    of the project for it to work)
    When i try to deploy the midlet (jar and jad files)
    on Nokia 6600, i obtain the error message
    "Authorisation failed" (Authorisation with an S
    rather than Authorization :) with a Z)
    I am starting to lose hope in the possibility of
    making this work on a real cell phone... so please
    any help would be highly appreciated.
    ThanksHey, i've done similar but was doing 3DES and installed and ran successfully on a Sony Ericssion t610. Although I did not place the midp_classes.zip in the lib folder. What i did was copy the necessary source files from the bouncy castle distro and place it together with my midlet source, compile, jar and obfuscate. So i have essentially only 1 jar file. Installed the jar via bluetooth and it works. Maybe you can try this approach. Hope it helps.
    Cheers.

  • Finder help needed - if possible

    I have a few problems with the current finder, and wonder if anyone has found a way around them, or if they are as inevitable as the computer freezes I've been suffering with since I upgraded to Lion.
    1) I know they got rid of the up/down scroll arrows, but trying to grab the little bar and move it down the page in Safari to get back to where I was in a thousand+ comment page....it gets old.  Does anyone know of a way to get it to either (a) return to where I was when I refreshed, or (b) make it easier to scroll down the page?
    2) when I try to read the last item in a finder window, that stupid sideways scroll bar shows up for a bit and I have to wait for it to clear before I can actually read the file name.  The old finder at least had the space around the outside, so it was easy to read.  Is there any way to change this, so that I can actually read - and, yes, I know I can use icons, but it's a lot easier to view 100+ files as names than icons. 
    3) speaking of the finder - when I add a file to said 100+ list, and don't have anything selected, the window always returns to the top of the list, rather than staying where I was.  To verify that the file was moved correctly, I have to scroll back down to where I was.  Other than clicking on a file near where my new file will go, is there any way to turn this bizarre behavior off?
    I think that's all - at least that's what is bothering me right now.  Other than the ugly look of the finder (and iTunes - I'm surprised how much I miss the rounded, more organic buttons - the square appearance is just ugly).  Is there any way I can change the appearance?  Sorry, I guess that would be #4.
    Any help would be appreciated.

    Can't help with your issues, since these are all "features" of Lion and AFAIK can't be changed. If you want to report these issues to Apple's engineering, send a bug report or an enhancement request via its Bug Reporter system. To do this, register as an Apple Developer—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report or enhancement request. You'll get a response and a follow-up number; thus, starting a dialog with engineering.

  • I need some help adding music to my slideshow in iPhoto.  When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

  • Runtime Error in File Preview of RH7 - Immediate help needed!

    Dear all,
    we're working on a RoboHelp 7 project under version control.
    Today we encountered a major issue with ur project/database. When opening files in the preview window, they are displayed without error. As soon you click on a link within this file that leads to another HTML file, you get a pop-up with a runtime error message. You're asked either to debug or not. Selecting no displays a second runtime error with the same question. After also declining, you get to the selected HTML file.
    We have two major sorts of files: Chapter overview pages and topic files. Both are based on the same Style Sheet (CSS) and template. For the overview files the layout is just changed a bit when you create the file. Further there are some extra files don't use the template.
    Now I recognized some kind of logic:
    - When you open an overview-file, the two pop-ups always refer to runtime errors in line 46 and 49.
    - When you open a topic file, the two pop-ups always refer to runtime errors in line 50 and 53.
    - When you open a file that is blank and not based on the template, there's no error.
    Until now, the error never occured. But since today (or maybe last week und we didn't recognize), this error comes up even for files that were created months ago and never had an error before. They were changed today automatically when a renamed a chapter. Even within our "clean and working" backups we now encounter this error.
    Questions:
    - Can anyone explain, what a runtime error is at all?
    - My assumption is, that it has something to do with the CSS or template, but I'm not sure. What can be wrong there?
    - To what lines do the specifications in the pop-up refer to? Where can I find those lines?
    As we are in a very critical project phase, I really need your assistance for a quick and effective solution. Please help me as soon as possible!! Thanks!!

    Hi Tom
    Here is my own educated guess.
    When you have links of any type in a HTML document, a calculation has to occur at the time they are created. The application has to calculate where the linked item is in relation to the existing page. Then HTML shorthand is created to navigate. Up a folder level is ../ and up two folder levels is ../../. Stuff like that.
    Popups are a different story. While you are still creating links, these beasties are actually handled using JavaScript. So the path is supplied in the call to the JavaScript.
    As if that weren't complex enough, we now toss Headers and Footers into the mix. Headers and Footers are tied to the Master Page. The Master Page is always in the root level of the project. Links in a Header and Footers often break because of the assorted locations of HTML pages if you are using folders to organize your project. So when you create the link initially as part of the Master Page, things are dandy and as long as the topic is in the project root folder (same as the Master Page) things would likely work fine. But if that Master Page is associated with a topic inside a folder level or two down, things can go to pot in a hurry! (Where are we all headed? And what's with the handbasket?)
    Hopefully this helps shed some possible explanation... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • HELP NEEDED!! (please) CS6

    HELP NEEDED!  I have been working for 3 days in a "new doc". Of course i have saved several times (control+s)
    but i do not remember it asking me about file name or folder. Today my comp crashed and i do not find the file. Just found 2 files (a tmp and one with no extension)
    : one with 174 mg and another one with almost 2 gb. Is there any possibility to recover my work? Photoshop did not oppened a thing when i restarted comp
    Thanks in advance

    The TMP file is your Scratch Disk file, and cannot be "recovered" to an Image file.
    Your second file might be almost anything. Though designed more for video files, both G-Spot and MediaInfo (both free file info utilities), CAN read several Still Image file types, and might help point out what that file (the one with no extension) really is. OTOH, as it could be almost anything, it could be that there is no header info in the file, for either to read.
    Good luck,
    Hunt
    PS - Before I did much additional work, I would investigate WHY your computer shut down. If you are on a PC, I would go into Event Viewer, at the time of the shutdown, and see if you can track down any warning, or error messages, in both the System and Applications Tabs. I am pretty sure that a Mac has similar, but have not a clue where, or even what it would be called.

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verif

    Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verifying and repairing it but had no luck. I also tried mounting and unmounting it but still no solution. Anyone to help please?

    Looks bad. I would strongly advise backing up the stuff on the other two partitions as soon as possible in case the rest of the drive goes wrong.
    Beyond that, Disk Utility has limited abilities to repair disks, DiskWarrior uses a different approach and might, emphasis might be more successful. It has certainly done the job for me in the past when Disk Utility could not.
    See http://www.alsoft.com/diskwarrior/

Maybe you are looking for