i'm facting a weired problem when executing my struts2 app using IE6.
I've got a 'submit' and 'cancel' button in my form:
<s:form namespace="/myns" action="submituser" >
. . .
< s:submit type="button" value="back" label="Back" action="init"/>
<s:submit type="button" value="next" label="Next" action="submituser"/>
....
When i click on "Next" the request gets forwarded to 'init'. But this only happens when using IE6 mozilla ie8 etc work fine.
any ideas?
thanks,
Michael
I think it is 'type="button' which is causing the issue.
See here for an explanation as to what IE 6 is up to: http://www.vancelucas.com/blog/ie6-and-multiple-button-submit-elements/
Related
When a user clicks the submit button in IE, we're getting this:
'ctl00_ctl00_ContentPlaceHolder1_search_btnSearch' is undefined
Chrome is fine, and pressing enter works.
I can't see anything strange with my code either:
<cms:SearchBox
ID="search"
SearchTextboxCssClass="searchTextbox"
ShowImageButton="false"
SearchButtonCssClass="searchButton"
SearchResultsPageUrl="~/Search-Results.aspx"
PredictiveSearchEnabled="false"
PredictiveSearchResultsCssClass="pSearch"
PredictiveSearchMinCharacters="2"
PredictiveSearchMaxResults="10"
PredictiveSearchOptions="BasicSearch"
PredictiveSearchMode="ExactPhrase"
PredictiveSearchSort="##SCORE##"
PredictiveSearchEnableSelection="true"
PredictiveSearchIndexes="KFF-Global-PagesCrawler"
ShowSearchLabel="False"
SearchMode="ExactPhrase"
runat="server" />
</div>
I'm not changing anything with the code behind either. I've tried a rebuild too.
How to prevent browser from remembering the password fields ... especially FireFox ( using jsf 2.0.9 ) I tried autocomplete= "off" ,still not working , Is there any possibility for this without migrating to jsf 2.2 ? Am using "h:inputSecret"
The autocomplete attribute is ignored and therefore not rendered in the output html. I had a similar problem, i wanted to use placeholder attribute. I ended up using jquery to accommodate the need
<script type="text/javascript">
jQuery(document).ready(function() {
document.getElementById("entityForm:searchField").setAttribute('placeholder','Search');
});
</script>
You can use this to set the autocomplete attribute
document.getElementById("passwordField").setAttribute('autocomplete','off');
You will never find a way to achieve this, cause the autocomplete in this case is happening on the client-side.
You can make it a little more difficult, but at the end of a day it's the users browser which decideds whether to store a password or not. If a user wants to store the password, he can always do it. (A Lot of Browsers are simply ignoring things like autocomplete="false", because its a user decision, nothing the website should decide.)
Hi all thanks fr yur solutions , Fixed the issue , just made some work around so that code is compatable with both Firefox and Chrome ,
Use "p:inputText"(Primefaces Component) instead of "h:inputSecret"
Code :
p:inputText onfocus="validate('Id')"
use javascript to change type to "password" upon focus :
function validate(Id){
document.getElementById(pwd).type = 'password'};
then comes the important workaround,adding tags before and after
<input type="text" name="faketext" id="faketext" style="display:none;"/>
<input type="password" value=" " name="fakepassword" id="fakepassword" style="display:none;" />
<!-- - After <p:inputText> -->
<input type="password" value=" " name="fakepassword1" id="fakepassword1" style="display:none;"/>
Thus issue Resolved.
Good Evening. I am new to SharePoint 2013 and would like to put a basic web part on my site that is just a form to allow my users to do a google web search from our intranet page and the search results would open in a new tab or window.
I have the script inserted into a script editor web part, when Im in the edit snippet window the preview below my code appears and works as tested, but when I save the web part to my page when I try to search the page just refreshes and nothing is passed to google.
Here is the code in my script web part:
<script language="JavaScript" type="text/javascript">
function search_google(){
window.open("http://www.google.com/search?q="+document.search.query.value);
}
</script>
<form name="search">
<input type="text" name="query" value="">
<input type="submit" value="Search Google" onClick="search_google()">
</form>
Any help would be greatly appreciated.
I know this is an old post, but to those that stumble across it: the reason for the page refreshing behaviour is because of the input type of "submit" on the "Search Google" input element. Submit always causes a page refresh in SharePoint (causing your onClick event handler to be ignored) UNLESS the page is in edit mode.
An input type of "button" should give you the desired behaviour in either page mode.
HTH, Bruce
I have a button which should open a web form from my project in a modal window. How can I achieve that with the devexpress popup control?
Use the Popup Control - Content URL to show another webform in the control. open popup on the button's client click event.
example:
<dx:ASPxPopupControl ID="popup" runat="server" ContentUrl="~/ContentPageWithTextBox.aspx"
Top="100" ClientInstanceName="clientPopup" CloseAction="CloseButton">
<ClientSideEvents Shown="OnShown" />
</dx:ASPxPopupControl>
Check this search Result
Reference:
How to manipulate client-side objects within a ASPxPopupControl with the specified ContentUrl - check example also.
Hope this help...
Here is sample code:
<input id="openBtn" type="button" value="Open popup"
onclick="myPopup.SetContentUrl('http://www.google.com');myPopup.Show();" />
<dx:ASPxPopupControl runat="server" ClientInstanceName="myPopup" Modal="True"
CloseAction="CloseButton" Width="500px" Height="400px"/>
ASPxClientPopupControl members
ASPxPopupControl members
See ASPxPopupControl Online Demos and the Code Central Examples to learn more on how accomplish this task.
I have some weirdness occurring while trying to switch from webrat to capybara. The error is this:
And I press "Create floob"
# features/step_definitions/web_steps.rb:27
no button with value or id or text 'Create floob' found (Capybara::ElementNotFound)
The html in my app looks like this:
<fieldset class="buttons">
<ol>
<input id="floob_submit" name="commit" type="submit" value="Create floob" />
</ol>
</fieldset>
I would have thought that capybara would look at the value of the buttons on the page, and reading the documentation this does seem to be the case, but it's not working! If I change the line in my cuke file to And I press "floob_submit" everything works, but I'd rather not change all my features...
Does anyone have any thoughts on why this might be happening and if there's a fix? Thanks friends!
The only thing I can see is that you aren't wrapping your input in an <li></li>. This might be confusing enough for the DOM to cause your problem.