PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, April 15, 2022

[FIXED] How to reset the iframe

 April 15, 2022     .net, iframe, javascript     No comments   

Issue

tbar: function (callback) {
    var items = [];
    items.push(lazyMethod_TopBarMenuBuilder("Create", false, "add16", "create1", function () { lazyMethod_OpenWindow('Vessel Detail', 'panelWindowId', 600, 1000, 'vos001_view.aspx') ; }));
    items.push(lazyMethod_TopBarMenuBuilder("Save", false, "add16", "save", fn_save));
    items.push(lazyMethod_TopBarMenuBuilder("Remove", false, "add16", "remove", remove));
    items.push(lazyMethod_TopBarMenuBuilder("Reset", false, "add16", "reset", resetform));
    items.push(lazyMethod_TopBarMenuBuilder("Export", false, "add16", "export", ""));
    callback(items);
},z

When click on the top bar reset i need the whole form to reset but after testing for hours still don't have the solution.

This is the function i use to reset the form but it is not working .

function resetform() { document.getElementById("formdetail").reset();

}


Solution

var iframeID = $('iframe').attr('id');
  alert(iframeID);
$('#' + iframeID).attr('src', function (i, val) { return val; });

this function works it get the iframe id and reset.



Answered By - hunt
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing