|
I just can't the following code to work in Firefox. It works in IE but I don't understand why it doesn't work in firefox. I also have another page has almost the identical code to the one below and it works fine, that's in firefox. Odd as!
<title>Untitled Document
function ChangeColour()
{
var Colour = "#00FF00";
var Row = Ingreds.rows[0];
Row.style.backgroundColor = Colour;
}
Click Here
modified on Wednesday, April 1, 2009 6:36 AM
|
|
|
|
|
Try posting again and tick the box that says:
"Ignore HTML tags in this message (good for code snippets)"
|
|
|
|
|
Hey guys
I'm trying to get some text go over another piece of text.
I've gotten it to work more or less by setting the position attribute to absolute for the text on the top. Here is the code for that
<div style="font-family: Courier New; text-align: center; background: rgb(213, 234, 255);">
<div style="position: absolute; font-size: 10pt; color: red; font-weight: bold; font-family: Comic Sans MS;">
Harvey Saayman - Lead Software Developer<br/>
Uniclox Technologies (PTY) Ltd<br/>
Office: 011-439-2042<br/>
Cell: 074-132-9393
</div>
<div style=" font-size: 12.5pt; color: rgb(0, 255, 0); font-family: Courier New;">
1010111 1101000 1100101 1110010 1100101 100000 1101001 1110100 100111 1110011 <br/>
100000 1100001 1101100 1110111 1100001 1111001 1110011 100000 1110100 1101001 <br/>
1101101 1100101 100000 1100110 1101111 1110010 100000 1100010 1110101 1110011 <br/>
1101001 1101110 1100101 1110011 1110011
</div>
</div>
With that the text does indeed display over the other text (the binary), but the main text is not centered and id like it to be...
Any ideas? Cause I'm all out
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
try these threee options
- use "text-align: center;" on the inner divs
- use a set style="width:300px; margin:auto;" on the 'contact info' div
- use a background image for the binary
|
|
|
|
|
i need image viewer which is used in website. which shows the scan documents and pictures. the functionality of that image viewer are that it can zoom, rotate, flip, edit text.
plz plz plz plz plz help i use it in my final project of university which is not available for only for desktop. so any one know about that plzzzzzzzzz share with me 
|
|
|
|
|
Hi
I am trying to store the images using asp.net browser control ie, fileupload. .Its with store the images in to the databse where i used as sqlserver as backend. It store but, after that i am trying to retrive those images through listview from backend. But here i am getting no error but no images are there in images.I need the names of the images in the listview from backend while clicking a particular image it should be enlarge in image control.Thanks in advance.Please help me.
In default.aspx.cs page:
public partial class _Default : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DigitalSignageConnectionString2"].ConnectionString.ToString());
protected void Page_Load(object sender, EventArgs e)
{
}
protected void BthSnd_Click(object sender, EventArgs e)
{
con.open();
SqlCommand mycommand = new SqlCommand("INSERT INTO Image_DiSig([image], [text],[path],[image1]) VALUES (@image, @text,@imgpath) ", con);
string apppath = Request.PhysicalApplicationPath;
FileUpload1.SaveAs(apppath + "images\\" + FileUpload1.FileName);
string imgpath = apppath + "images\\" + FileUpload1.FileName;
FileStream fs = File.OpenRead(imgpath);
byte[] imagedata = new byte[fs.Length];
mycommand.Parameters.AddWithValue("@image", imagedata);
mycommand.Parameters.AddWithValue("@text", TextBox1.Text);
mycommand.Parameters.AddWithValue("@imgpath", apppath);
mycommand.ExecuteNonQuery();
con.Close();
}
public string FormatURL2(object strArgument) //used to get that image bytes(while tracing its picking that bytes but not converting into image)
{
return ("Default2.aspx?id=" + strArgument);
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("select * from Image_DiSig",con);
DataSet ds = new DataSet();
da.Fill(ds);
ListView1.DataSource = ds;
ListView1.DataBind();
}
protected void ListView1_SelectedIndexChanged(object sender, EventArgs e)
{
Image1.ImageUrl = ListView1.SelectedValue.ToString();
}
in default.aspx source page:
<asp:ListView ID="ListView1" runat="server"
onselectedindexchanged="ListView1_SelectedIndexChanged" SelectedIndex="0" >
<LayoutTemplate>
<div style="border:dotted 1px black;">
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</div>
</LayoutTemplate>
<ItemTemplate>
<img alt="name" align="middle" height="50px" width="100px" name="Image1" src='<%# FormatURL2(DataBinder.Eval(Container.DataItem, "id")) %>' />
</ItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:DigitalSignageConnectionString2 %>"
SelectCommand="SELECT * FROM [Image_DiSig]"></asp:SqlDataSource>
in default2.aspx.cs:
public partial class Default2 : System.Web.UI.Page
{
SqlCommand cmdd = new SqlCommand();
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DigitalSignageConnectionString2"].ConnectionString.ToString());
protected void Page_Load(object sender, EventArgs e)
{
string strImageID = Request.QueryString["id"];
try
{
conn.Open();
SqlDataReader dr = null;
cmdd = new SqlCommand("select image from Image_DiSig where id=" + strImageID,conn);
dr = cmdd.ExecuteReader();
while (dr.Read())
{
if (dr["image"].ToString() == "")
{
Response.Write("no image");
}
else
{
byte[] img = (byte[])(dr["image"]);
Response.BinaryWrite(img);
}
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
finally
{
conn.Close();
}
}
}
With Regards
Ch.Gayatri Subudhi
|
|
|
|
|
|
Hi,
I have a form, and in this form, there's a button and a listbox.
The question is how to add a item to the listbox using javascript when the user clicks on the button.
This is my thinking but it doesn't work.
<script language="javascript">
var lb = document.getElementById('mylist');
lb.options.....(what will be here?) :doh:
</script>
<form>
<select name="mylist" id="mylist">
</select>
</form>
Thanks in advance
Nguyen Quang Huy
modified on Wednesday, April 1, 2009 4:16 AM
|
|
|
|
|
Try the following:
<script language="javascript">
var lb = document.getElementById('mylist');
var option = document.createElement("option");
lb.options.add(option);
option.text = "This is option one";
option.value = "1";
</script>
|
|
|
|
|
thank you very much, it works properly.
Nguyen Quang Huy
|
|
|
|
|
Hello,
I have an ASP.Net application where all my TextBox components contain the "onblur" and "onfocus" events.
The principle:
- I'd like to allow the text selection in the control (when focusing)
- I'd like to disable the text selection of my page when outside the control (on onblur)
So, I have this code on the onfocus event :
Code:
function SetBodyDragOn(o)
{
document.body.onselectstart = new Function("return true;");
document.body.ondragstart = new Function("return true;");
document.body.onselect = new Function("return true;");
if (o)
o.className = "InputEditingOn";
}
And this one on the onblur event :
Code:
function SetBodyDragOff(event, o)
{
if (typeof event.preventDefault != 'undefined') event.preventDefault();
document.body.onselectstart = new Function(" {event.returnValue=false; try { event.stopPropagation(); event.preventDefault() } catch (ex) {alert(ex.message)} return false; } ");
document.body.ondragstart = new Function(" {event.returnValue=false; try { event.stopPropagation(); event.preventDefault() } catch (ex) {alert(ex.message)} return false; } ");
document.body.onselect = new Function(" {event.returnValue=false; try { event.stopPropagation(); event.preventDefault() } catch (ex) {alert(ex.message)} return false; } ");
if (o)
o.className = "InputEditingOff";
}
With all the browsers (even Firefox), it works fine during one moment.
After a certain time of using, on Firefox, the onblur is not fired.
The cursor stays in the control.
Why this behavior?
Why it works a certain time and not after (memory problem?)
To soluce the problem, I have to reboot my Firefox.
Thanks in advance,
Yannis.
|
|
|
|
|
I have a custom application page with code-behind in WSS. The page has two dropdownlists, one with AutoPostback=true so it will filter the contents of the second. They are wrapped in an Ajax UpdatePanel.
When I select from the first dropdown I get the below Javascript error. Doing a Google search finds 5 hits (and two are from us). Has anyone come across this?
System.Runtime.CompilerServices.StrongBox`1..ctor(System.__Canon)
This is definitely a WSS issue since the code has been tested in an ASP.NET page and it works as expected.
only two letters away from being an asset
|
|
|
|
|
Maybe it's the javascript.
|
|
|
|
|
Brilliant!
only two letters away from being an asset
|
|
|
|
|
I've been trying to narrow the problem down. I'm trying to filter a list of states based on the selected country
int countryID = Convert.ToInt32(CountryList.SelectedItem.Value);
var states = context.State.Where(c => c.Country.ID == countryID).ToList();
var states = context.State.Where(c => c.Country.ID == 2).ToList();
StateList.DataSource = states;
StateList.DataBind();
No matter how I try filter the EF object, Select, Where, etc., if it uses a variable, it fails. I've even tried creating a DataTable and populating it from states, but that doesn't work either.
Very perplexing.
only two letters away from being an asset
|
|
|
|
|
Hi guys,
I am currently writing the payment part of a webshop. There are three ways of payment, and the customer szelects one of these three by means of a selection in the form. The actual submit button start a javascript function that checks the payment method and sets the form's target to a intermediate page for each of the three payment methods. The code I use is very simple:
if (document.orderform.method[0].checked == true)
{
document.orderform.target = '_self';
document.orderform.submit();
}
else if (document.orderform.method[1].checked == true)
{
document.orderform.target = '_self';
document.orderform.action = 'ideal.php';
document.orderform.submit();
}
else if (document.orderform.method[2].checked == true)
{
document.orderform.target = '_blank';
document.orderform.action = 'paypal.php';
document.orderform.submit();
}
else
alert ("please select a payment method");
This works fine in firefox, however IE7 says "object doesn't support this property or method" This occurs at "...action='ideal.php';" When I give the action a value (document.orderform.action.value='ideal.php') IE does not complain, but does not change the form's action either (also firefox does not change the action anymore)
Does anyone have a suggestion on how to change the form's action in all browsers?
Any suggestions are greatly appreciated.
Thanks in advance,
William
|
|
|
|
|
run this through jslint,
tips:
always use triple = for comparison (===)
opening brackets must come on the same line as the conditional statement opening them, Javascript does strange things in certain situations if it's on the next line.
|
|
|
|
|
Code like this:
string connectstring = @"data source=abc;initial catalog=XXX;integrated security=sspi";
sqlConnection connection = new SqlConnection(connectstring);
connection.Open();
when I use these code to connect the same db(not in webservice method), it works, but I run it in my webservice, it throw a exception that error ocurred in get_serverversion.
Does any body here meet a same question? 
|
|
|
|
|
What is the best free file zip application for classic asp. 
|
|
|
|
|
|
AoA
Thanks in advance for help. Please help me if any one have some info about it.
I have made a solution with three projects a web services project , a client windows application project and a class library project.
I made a class in class library. this class library is added as reference in the client and web services project.
Now from client application, when i call some web methods of the web service they work fine.
I have a web method with an object type attribute. that method just cast it to string using ToString() and return that string. Now i made an object of a class in class library.
When i call that web method and pass this object. An InvalidOperationException generated, with error message There was an error generating the XML document.
I can not solve this, i search it on web but no solution found. I can not know how to upload the code here.
Please help me if any one can.
Will wait for reply.
|
|
|
|
|
Alright I have been asked to create a rather particular website. to meen it lookes like I need to create frames. Seemless frames. The issue is I have no real clue as to how to go about doing this. The top and sides of the website need to always remain as they are while the middle frame, the content, needs to actually be a completely different website. I am doing work for sub contractors of this business
http://www.kenthomes.com/
This sub business is making a website (through me) and the main business (kent homes) wants all the contact to be from their site. Below is a link to an image visually depicting what needs to be created. the green section needs to be the ACTUAL kent homes website and the blue and red sections need to be the sub vendors header image and sides. "Frames" Can anybody tell me how I can overcome this issue?
http://i98.photobucket.com/albums/l280/MH_Strife/frames.gif
|
|
|
|
|
Here, the basics of html frame[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
hmm. Thank you very much. though even with this I still am not sure how I would make a layout like the one described in my description. From what I used of frames a few years ago I also thought you could drag the window to whatever size the user pleased?
|
|
|
|
|
I really need to get this website done this weekend. Is there anybody that can help?
|
|
|
|