www.webdeveloper.com
Results 1 to 11 of 11

Thread: Need Help with Java!

  1. #1
    Join Date
    May 2014
    Posts
    10

    Need Help with Java!

    So per my bosses request I created a webpage that has a form embedded with an iframe. The form was created with Nintex forms, and published via their live option. So with this for there is a little yellow box on the right hand corner that says setting and gives the option for the user to change their time zone. So we want that removed. We don't want it there, it has no application purposes for us, the time does not matter. However this is no way to remove this with in the options in forms. The only thing I've found referencing this button is in the source code for the Iframe. I am a very beginner for javascript, I need a code that will remove or hide the settings button. I can add the code into the form settings as custom java. But i cant change the base java of the form, which is where this button is embedded.


    Here is a link for the form:
    http://tekdoginc.com/redeem/

    The code of the button in the source:

    <div id="settingsButton" class="settings button">
    <span id="settingsText">Settings</span><img src="Images/downArrow.png" />
    </div>
    <div id="settingsPane" class="settings pane" style="display: none;">
    <div id="settingsPaneHeader">
    </div>
    <div id="settingsPaneInner">
    <div>



    After this code, there is code for all of the time zones in the drop down box.

    Please any help would be greatly appreciated.

  2. #2
    Join Date
    Oct 2013
    Posts
    470
    Aaah! Another case of a WYSIWYG editor producing WYSINWYW (What You See Is Not What You Want) code/results.

    In an ideal world you would have editing privileges on the raw HTML. If that were the case you could just delete the <div>s in question, or at least slap a style="display:none;" attribute on them. By all means if you can do that it would be preferable to messing around with JavaScript.

    That stated, and not having seen what's allowable in the JavaScript editor you mention, I'm gonna throw this out for testing:

    Code:
    onload=function(){
    	document.getElementById('settingsButton').style.display = 'none';
    	document.getElementById('settingsPane').style.display = 'none';
    	document.getElementById('settingsPaneHeader').style.display = 'none';
    	document.getElementById('settingsPaneInner').style.display = 'none';
    }
    Copy/paste into the editor and see what happens.

    A couple of caveats:
    1) I suspect that the custom JavaScript gets written to a separate file such as "custom.js" and the form builder then writes a line similar to <script src="custom.js"></script> to the HTML for the page. If that's the case this should work. If that's not how it works this is a crapshoot; things could break -- badly.
    2) Just because the <div>s in question don't appear on the form doesn't mean that the value for that input won't be sent. In fact, it probably will whether or not you need it.

  3. #3
    Join Date
    May 2014
    Posts
    10
    Testing it now, I will be back with the results!

  4. #4
    Join Date
    May 2014
    Posts
    10
    Alas after adding the script to custom java script location on the form, it still appears once loaded in my iframe. Should I try placing it in my iframe coding?

  5. #5
    Join Date
    May 2014
    Posts
    10
    Well nvm I did that too and it didnt work.

  6. #6
    Join Date
    Oct 2013
    Posts
    470
    Quote Originally Posted by c.marie.ward View Post
    Alas after adding the script to custom java script location on the form, it still appears once loaded in my iframe. Should I try placing it in my iframe coding?
    Yes, it needs to be added to the page that is loaded in the iframe. Cross-domain scripting is not allowed for (hopefully obvious) reasons -- i.e. a Javascript on your domain cannot affect anything on my domain.

  7. #7
    Join Date
    Oct 2013
    Posts
    470
    Quote Originally Posted by c.marie.ward View Post
    Well nvm I did that too and it didnt work.
    You may be SOL then. The only way to get rid of that yellow thingy is to edit, either directly or indirectly via javascript, the code that affects it.

  8. #8
    Join Date
    May 2014
    Posts
    10
    hmmm, could you maybe do go to meeting session later, and I could show you the form building program I am working with.

  9. #9
    Join Date
    May 2014
    Posts
    10
    OH WAIT IT WORKED!!!! OMG TYTYTY Just had to publish the page. Forgot that step on my end!

  10. #10
    Join Date
    Oct 2013
    Posts
    470
    Uuuummmm. OK. Well. Hmm.

    Que es "go to meeting session"?
    http://www.gotomeeting.com/ ???

    Never used it before but I suppose I could if needed. Or "Join a meeting" if you set it up?

  11. #11
    Join Date
    Oct 2013
    Posts
    470
    Wooo Hoo! Glad it worked!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles