I am new to vb scripts and I am having problems creating a vb script that firstly logs-in the user and then navigates to a certain page once logged in.
The script below opens IE then navigates to the log-in page and enters the UserName and Password and clicks the 'Log-In' button.
Please can someone advise how I can add to this script? I would like to send the user to a certain page once they are logged in.
WScript.Quit Main
Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "http://examplewebsite.com"
Wait IE
With IE.Document
.getElementByID("UserName").value = "username"
.getElementByID("Password").value = "password"
IE.Document.All.Item("login-submit-button").Click
End With
End Function
Sub Wait(IE)
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub
Sub IE_OnQuit
On Error Resume Next
WScript.StdErr.WriteLine "IE closed before script finished."
WScript.Quit
End Sub
I have tried adding the code below but it didn't work:
WScript.Sleep 10000
IE.Navigate "http://the_required_page.html"
The log-in is successful and I can manually navigate to the required page by clicking the link for the required page, but I cannot seem to automate navigating to the page within the script.
Any assistance is gratefully received.
Many thanks,
James
Edit - source code for website
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Trakline Dashboard Portal</title>
<link rel="shortcut icon" href="http://london.trakline-ats.co.uk/resources/images/favicon48.ico" type="image/x-icon" />
<link rel="shortcut icon" type="image/png" href="http://london.trakline-ats.co.uk/resources/images/CustomIcons/96px/favicon.png" />
<!-- For iPhone 4 with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/resources/images/mobile/home114.png" />
<!-- For first-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/resources/images/mobile/home72.png" />
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: 57x57-->
<link rel="apple-touch-icon-precomposed" href="/resources/images/mobile/home57.png" />
<meta name="application-id" content="Ats" />
<meta name="application-name" content="Trakline Dashboard" />
<meta name="msapplication-task" content="name=Dashboard;action-uri=http://london.trakline-ats.co.uk/Home/Index/1;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" />
<meta name="msapplication-task" content="name=Driver;action-uri=http://london.trakline-ats.co.uk/Driver/Index;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" />
<meta name="msapplication-task" content="name=Place;action-uri=http://london.trakline-ats.co.uk/Place/Index;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" />
<meta name="msapplication-task" content="name=Resource;action-uri=http://london.trakline-ats.co.uk/Resource/Index;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" />
<meta name="msapplication-task" content="name=Tracking;action-uri=http://london.trakline-ats.co.uk/Tracking/Index;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" />
<meta name="msapplication-task" content="name=Job Management Summary;action-uri=http://london.trakline-ats.co.uk/Work/JobManagementSummary;icon-uri=http://london.trakline-ats.co.uk/resources/images/favicon48.ico" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" type="text/css" href="/Content/bundles/DefaultCss?v=5yfqfmmmlZJHRL7LnThimyGpnaudP_rjY0267sKWKCs1" />
<link rel="stylesheet" type="text/css" href="/Content/bundles/BootstrapCss?v=U8XMYNxuaH-VgydGMd0j-UlPVtSRmGgzgAeLpBb9PzA1" />
<link rel="stylesheet" type="text/css" href="/Content/bundles/MapCss?v=_NG0UPFwckHnB0mbnxCHfABwf4bb0swcSlUOmSbgnpg1" />
<link rel="stylesheet" type="text/css" href="/Content/bundles/DataTablesCss?v=RfwLQxGDTuOKhHht1soeL-FFxjkoS9dp2lDPjjt4Q-g1" />
<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" href="/Content/default/Bootstrap/css/bootstrap-ie9.css" />
<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="/Content/default/Bootstrap/css/bootstrap-ie8.css" />
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="/Content/default/Bootstrap/css/bootstrap-ie7.css" />
<![endif]-->
<link href="/Zip/Style/8_12_0_HF01?Path=dAAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLunlTLNl%2B2d6vLvK6LWX73rKnaOnt796d%2F0Tqvr7fXxfbueHdnfG88XTdttRhPm%2BZnht%2F6wQ9%2BELaY5efZumzvNvl0XeczfPn%2FBAAA%2F%2F%2Fyf7AEdAAAAA%3D%3D" type="text/css" rel="stylesheet" />
<!--[if lt IE 9]><link href="/Zip/Style/8_12_0_HF01?Path=JgAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLunlTLNl%2B2d2f5ebYu27tPq6vlRZ3N8id1ddXk9cF42jT%2FTwAAAP%2F%2FM%2FnnIiYAAAA%3D" type="text/css" rel="stylesheet" /><![endif]-->
<!--[if lt IE 8]><link href="/Zip/Style/8_12_0_HF01?Path=JgAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLunlTLNl%2B2d2f5ebYu27tPq6vlRZ3N8id1ddXk9YPxtGn%2BnwAAAP%2F%2F4m63oCYAAAA%3D" type="text/css" rel="stylesheet" /><![endif]-->
<!--[if lt IE 7]><link href="/Zip/Style/8_12_0_HF01?Path=JgAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLunlTLNl%2B2d2f5ebYu27tPq6vlRZ3N8id1ddXk9afjadP8PwEAAP%2F%2FUkfXnSYAAAA%3D" type="text/css" rel="stylesheet" /><![endif]-->
</head>
<body class="secured">
<div class="page">
<div id="header">
<h1>
</h1>
</div>
<div id="main">
<p>
<img src="/resources/images/default/logo.png" alt="Trakline" title="Trakline" />
</p>
<p>
Please enter your username and password.
</p>
<form action="/Account/Logon" id="login-form" method="post"><input data-val="true" data-val-required="The IsForgottenPassword field is required." id="IsForgottenPassword" name="IsForgottenPassword" type="hidden" value="False" /><input Value="0" data-val="true" data-val-number="The field LogOnAttemptCount must be a number." data-val-required="The LogOnAttemptCount field is required." id="LogOnAttemptCount" name="LogOnAttemptCount" type="hidden" value="0" /><input Value="0" data-val="true" data-val-number="The field CaptchaAuthenticationId must be a number." data-val-required="The CaptchaAuthenticationId field is required." id="CaptchaAuthenticationId" name="CaptchaAuthenticationId" type="hidden" value="0" /><input Value="False" data-val="true" data-val-required="The ShowCaptcha field is required." id="ShowCaptcha" name="ShowCaptcha" type="hidden" value="False" /> <fieldset class="ui-state-default ui-corner-all">
<div class="editor-label">
<label for="UserName">Username</label>
</div>
<div class="editor-field">
<input data-val="true" data-val-required="The Username field is required." id="UserName" maxlength="32" name="UserName" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="UserName" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="Password">Password</label>
</div>
<div class="editor-field">
<input autocomplete="off" data-val="true" data-val-required="The Password field is required." id="Password" name="Password" type="password" />
<span class="field-validation-valid" data-valmsg-for="Password" data-valmsg-replace="true"></span>
</div>
<input type="submit" value="Log On" id="login-submit-button" />
<a id="forgotten-submit-button" href="#">Forgotten Password</a>
</fieldset>
<div id="downgradeCompatWarning"></div>
</form>
<div id="footer">
</div>
</div>
</div>
<div id="buildDetails">
<div id="buildDetailsSummaryLink">
?
</div>
<div id="buildDetailsSummary">
<dl>
<dd>BuildVersion: "8.12.71.429"</dd>
<dd>HotFix: "8_12_0_HF01"</dd>
<dd>BuildDate: "12/22/2014 00:32:04"</dd>
<dd>RenderDate: "02/24/2015 16:03:54"</dd>
</dl>
</div>
</div>
<script type="text/javascript" src="/Zip/Script/8_12_0_HF01?Path=BAIAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLuvp7Wxapt7k7XTVst7p4uL4u6Wi7yZev%2F%2FpNZXWSTMm%2FGP938jH3np3%2FROq%2Bvt3fHD8c7kS%2FG62U1aet1U1zm29lPZ%2B%2FGi2IZa3eZlcUsa%2FOxILGxiQczaKf4S%2FOviu2XdV5W2SyG77oglHd3OjgrgFVdtVV7veoMtWiqts7eGgxnRVZWF7H3szKv2%2BCL7%2FwEej191%2BbLpqiWdkgvs6a5qurZ67bOlxftPAZtUldXTV4%2Fzdt82tLLw0MeGwxXCjbW9FXeVOt6mjfut%2FFPN%2F9PAAAA%2F%2F9Zc2F%2FBAIAAA%3D%3D"></script><script type="text/javascript" src="/Zip/Script/8_12_0_HF01?Path=dQAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLuNtO6WLXN3em6aavF3VV2kTd3j6fTar1s777Mmuaqqmcn82x5kY9%2FuvmZze2fVxfVkpu9Dps9WRfl7E11cVECyv8TAAD%2F%2F2%2FH3511AAAA"></script>
<script type="text/javascript" src="/Zip/Script/8_12_0_HF01?Path=FwAAAB%2BLCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee%2B%2B997o7nU4n99%2F%2FP1xmZAFs9s5K2smeIYCqyB8%2FfnwfPyLuvp7Wxapt7k7XTVst7p5UdT7%2B6eb%2FCQAA%2F%2F9BgP%2BAFwAAAA%3D%3D"></script>
</body>
</html>
Try like this :
Option Explicit
Dim IE,Helem
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = 1
IE.navigate "http://www.example.com/login"
Do While (IE.Busy)
WScript.Sleep 10
Loop
Set Helem = IE.document.getElementById("UserName")
Helem.Value = "NomUtilisateur"
Set Helem = IE.document.getElementById("Password")
Helem.Value = "MotDePasse"
Set Helem = IE.document.Forms(0)
Helem.Submit
Related
i have create some custom page for my mikrotik hotspot
but i have problem with it
with default hotspot theme when i checked "HTTP-CHAP" client users login without any error
but with my custom error client users can't login into hotspot and they saw this error "web browser did not send challenge response (try again, enable JavaScript)"
this is my custom HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!--META-->
<link href="css/font-awesome.min.css" type="text/css" rel="stylesheet">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<title>ورود کاربر</title>
</head>
$(if chap-id)
<form name="sendin" action="$(link-login-only)" method="post">
<input type="hidden" name="username" />
<input type="hidden" name="password" />
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
</form>
<script type="text/javascript" src="/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
//-->
</script>
$(endif)
<!--STYLESHEETS-->
<!--SCRIPTS-->
<script type="text/javascript" src="/jquery.min.js"></script>
<!--Slider-in icons-->
<body id="login-body">
<form name="login-form" class="login-form" action="" method="post">
<div class="header">
<center><p style="text-align: center;"><img src="images/logo.png" /></p></center><!--END TITLE-->
</div>
<div class="content">
<form name="login" action="$(link-login-only)" method="post"
$(if chap-id) onSubmit="return doLogin()" $(endif)>
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<input name="username" type="text" required="required" placeholder="نام کاربری خود را وارد نمایید" class="login-input" onfocus="this.value=''" size="30" /><!--END USERNAME-->
<input name="password" type="password" required="required" placeholder="رمز عبور خود را وارد نمایید" class="login-input" onfocus="this.value=''" size="30" /><!--END PASSWORD-->
<button class="login-btn" type="submit">اتصال <i class="fa fa-sign-in fa-lg"></i></button>
<font color="#AC2925"><center>$(if error) $(error) $(endif)</center></font>
</div>
</form>
</body>
<script type="text/javascript">
<!--
document.login.username.focus();
//-->
</script>
</html>
i'm a web devoper from Italy...I have a problem with loading with href
example:
i have one.html with this code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>dkrMobile</title>
<!--caricamento librerie-->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
</head>
<body>
<!-- LOGIN -->
<div data-role="page" id="loginPage">
<div data-role="content">
<div style=" text-align:center">
<img style="width: 70%;" src="http://www.laboncloud.it/dkrmobile/css/images/logdkr.png">
</div>
<form action="#pageFile">
<div data-role="fieldcontain">
<label for="userNameLogin">
Username
</label>
<input name="" id="userNameLogin" placeholder="" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="passwordLogin">
Password
</label>
<input name="" id="passwordLogin" placeholder="" value="" type="password">
</div>
<a data-role="button" data-theme="a" data-transition="fade" href="two.html" data-prefetch="trues">
Login
</a>
</form>
</div>
</div>
</body>
</html>
and the two.html with this code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>dkrMobile</title>
<!--caricamento librerie-->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
<link rel="stylesheet" href="css/jqm-icon-pack-fa.css">
<script type="text/javascript" src="js/tolito-1.0.5.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/tolito-1.0.5.min.css" />
<!--css userinterface-->
<link rel="stylesheet" href="css/ui.css" />
</head>
<body>
<div data-role="page" id="loadingPage">
<div data-role="content">
<h1>caricamento di tutti i contenuti in corso</h1>
<a data-role="button" data-theme="a" data-transition="fade" href="#pageFile">skip</a>
</div>
</div>
<div data-role="page" id="pageFile">
<div data-role="content">
<h1>dueeee</h1>
</div>
</div>
<!-- FILE-->
</body>
</html>
now if tap on login - the two.html will no be loaded.
want a demo?
here the demo
if I click on skip in two.html dont show nothing (if I refresh the page it start work).
the only way is data-ajax="false" ? why?
This is not an error. To understand this problem you must understand how jQuery Mobile works.
Multi HTML template can't be mixed with multi page template. For example when working with several HTML pages, only first one can have more then one page. When jQuery Mobile loads other HTML files it will strip HEAD (we dont need it because first HTML HEAD content is already loaded into the DOM) and it will load ONLY first page it can find in a file, every other page will be discarded.
data-prefetch will not help you here. Also you are initializing it incorrectly, data-prefetch attribute don't have a value, it is just data-prefetch, example:
<a data-role="button" data-theme="a" data-transition="fade" href="two.html" data-prefetch>Login</a>
If you want to find out more how jQuery Mobile handles multiple HTML and multiple page templates or what are they take a look at this ARTICLE or THIS one. To be transparent they are my personal blog articles. Everything you need to know can be found there.
Basically solution to your problem would be to have all pages inside a single HTML file, or you should brake two.html into two separate HTML files. you decide what is a best solution for you.
i am trying to this plugin https://developer.snapappointments.com/bootstrap-select/
It transforms your select into a bootstrap dropdown button. It keeps the select to keep the form consistency, so you can submit the selected value.
however, no transformation occurs.
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="Final_Year_Project_Allocation_System.Site1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<!-- styling select -->
<link href="silviomoreto-bootstrap-select-d4ec9bd/bootstrap-select.css" rel="stylesheet"
type="text/css" />
<script src="silviomoreto-bootstrap-select-d4ec9bd/bootstrap-select.js" type="text/javascript"></script>
<link href="silviomoreto-bootstrap-select-d4ec9bd/bootstrap-select.min.css" rel="stylesheet"
type="text/css" />
<script src="silviomoreto-bootstrap-select-d4ec9bd/bootstrap-select.min.js" type="text/javascript"></script>
<title>:: Project Allocation System</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<div class="container-fluid">
<form id="form1" runat="server" class="form-horizontal">
<div class="span12"><br /><br /><br /></div>
<div class="row-fluid">
<div class=" span3">
<!--Sidebar content-->
<asp:ContentPlaceHolder ID="SideBarContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="span9">
<!--Body content-->
<asp:ContentPlaceHolder ID="BodyContent" runat="server">
**<select class="selectpicker">
<optgroup label="Picnic">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</optgroup>
<optgroup label="Camping">
<option>Tent</option>
<option>Flashlight</option>
<option>Toilet Paper</option>
</optgroup>
</select>**
</asp:ContentPlaceHolder>
</div>
</div>
</form>
</div>
</body>
</html>
I want some static pages of application to be rendered from XML i.e. i am planning to have a base page and xml containing structure of the page and xslt which will be transforming this xml to html and at runtime i will be rendering this html to my view and displaying this view
Is there any way/ example for doing the same. Please help
Here is the sample xml
<!DOCTYPE html>
<html>
<head>
<title>Create</title>
<script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript" />
<link href="/Content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-ui.js" type="text/javascript" />
<script src="/Scripts/jquery.validate.min.js" type="text/javascript" />
<script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript" />
<script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript" />
</head>
<body>
<div id="menucontainer">
<ul id="menu">
<li>
Rutu
</li>
<li>
Employee
</li>
</ul>
</div>
<h2>Create</h2>
<script src="/Scripts/jquery.validate.min.js" type="text/javascript" />
<script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript" />
<form action="/Employee/Create" method="post">
<fieldset>
<legend>EmployeeDetailsModel</legend>
<div class="editor-label">
<label for="EmpName">EmpName</label>
</div>
<div class="editor-field">
<input class="text-box single-line" id="EmpName" name="EmpName" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="EmpName" data-valmsg-replace="true" />
</div>
<div class="editor-label">
<label for="DeptId">DeptId</label>
</div>
<div class="editor-field">
<input class="text-box single-line" data-val="true" data-val-number="The field DeptId must be a number." data-val-required="The DeptId field is required." id="DeptId" name="DeptId" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="DeptId" data-valmsg- replace="true" />
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
</form>
<div>
Back to List
</div>
There is a good blog post here that describes how to create an HTML Helper to render the XSLT in a view. You just call the helper class from your view passing in the path to the XSLT and the XML. I have modified this helper so that you can also pass the XSLT and XML as strings to achieve the same results.
MvcContrib project provides an XSLT based view engine http://mvccontrib.codeplex.com/releases - I would suggest to check it out.
I'm experimenting with jQuery Mobile and have run into a problem on my Windows Phone 7 browser.
Whenever I add a button to the page, either <input type='button'> or <button>, the whole page doesn't render in the WP7 IE.
When I view the same page in IE7 (using IETester) I get a Script Error "Object doesn't support this property or method" Line 17 Char 45703, and then the page doesn't render.
Here's the html that's generated for my page:
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" /><link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
<title>
iplan
</title></head>
<body>
<div data-role="page" data-theme="b">
<div data-role="header">
<h1>
mobile login</h1>
</div>
<div data-role="content">
ello
<form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTIzNjAxMDE2M2Rk5Yr3L4N9Yyh0TZrUHAh3ZX6rJck=" />
</div>
<label for="ctl00_ContentPlaceHolder1_txtUsername" id="ctl00_ContentPlaceHolder1_lblUsername">Username</label>
<input name="ctl00$ContentPlaceHolder1$txtUsername" type="text" id="ctl00_ContentPlaceHolder1_txtUsername" />
<br />
<label for="ctl00_ContentPlaceHolder1_txtPassword" id="ctl00_ContentPlaceHolder1_Label1">Password</label>
<input name="ctl00$ContentPlaceHolder1$txtPassword" type="password" id="ctl00_ContentPlaceHolder1_txtPassword" />
<br />
<input type="submit" name="ctl00$ContentPlaceHolder1$btnLogin" value="Login" id="ctl00_ContentPlaceHolder1_btnLogin" />
<span id="ctl00_ContentPlaceHolder1_Label2">Boo</span>
</form>
</div>
<div data-role="footer">
© 2011</div>
</div>
</body>
</html>
When I remove that <input type="submit" ... the page renders correctly.
Any ideas?
I had the same problem. Turned out I was using an out of date version of jQuery.
Solved this by using the most recent version.