|
Mohammad Dayyan wrote: So, How we can write a class that affect any div tags within rightSide tag.
.rightSide div ...will match any DIV elements within an element having a class of rightSide .
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
|
Hello, I am trying to write a simple javascript and am having a bit of trouble.
I have an object that has a height of "309" and a width of "589"
and an image with a height of "190" and a width of "216"
I simply want the image to cover the top right hand corner of the object. I am wondering if anyone could provide the code to accomplish this?
Thanks
|
|
|
|
|
You'd need to get the top and left pixel co-ordinates with:
var top = object.style.top;
var left = object.style.left;
You'd then need to change the image's top and left values:
image.style.top = top;
image.style.left = left+(589-216);
Note that the image must be positioned as absolute to place it over the object.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Thanks
It did not seem to work properly. I'm sure there is something wrong with my code.
This is what I have so far...
var top = object.style.top;
var left = object.style.left;
<object type="application/x-shockwave-flash" height="309" width="589" data="http://videos2.videobloom.com/container.swf" allowScriptAccess="never" allowNetworking="internal">
<param name="allowScriptAccess" value="never" >
<param name="allowNetworking" value="internal" >
<param name="movie" value="http://videos2.videobloom.com/container.swf" >
<param name="flashvars" value="contentId=48ea33ceb84fb" >
<param name="wmode" value="transparent" ></object>
image.style.position = absolute;
image.style.top = top;
image.style.left = left+(589-216);
<img alt="" src="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" uid="ece60e54-bc33-4328-92ec-6815c5488089" wstxclass="Image" mainsrc="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" /></p>
Could you help me fix it?
|
|
|
|
|
Okay:
- Any Javascript in the page must be put in
<script> tags. - Sorry I didn't make it clear -
object and image were just names assigned to the image and the object to demonstrate how you would do it. They must actually be assigned a value (the handle to both objects - see the code below) - As
absolute is a string and not a variable, it must be put in speech marks (""s). - It would also be beneficial to put the two bits of Javascript together (it helps to neaten everything up, too).
- Also, after looking at your code, it would be better to use the
offsetLeft and offsetTop properties of the object, as this will account for any page margins etc.
This comes out as:
<object type="application/x-shockwave-flash" id="object" height="309" width="589" data="http://videos2.videobloom.com/container.swf" allowScriptAccess="never" allowNetworking="internal">
<param name="allowScriptAccess" value="never">
<param name="allowNetworking" value="internal">
<param name="movie" value="http://videos2.videobloom.com/container.swf">
<param name="flashvars" value="contentId=48ea33ceb84fb">
<param name="wmode" value="transparent" ></object>
<img alt="" id="image" src="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" uid="ece60e54-bc33-4328-92ec-6815c5488089" wstxclass="Image" mainsrc="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" /></p>
<script language="Javascript">
var object = document.getElementById("object");
var top = object.offsetTop;
var left = object.offsetLeft;
var image = document.getElementById("image");
image.style.position = "absolute";
image.style.top = top;
image.style.left = left+(589-216);
</script>
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Perfect!
Thank you so much!
|
|
|
|
|
I guess you can do it with CSS:
.topRight{
background: #CC9900;
top: 0px;
height: 150px;
width: 150px;
position: fixed;
float: right;
}
|
|
|
|
|
Mohammad,
It has been a few weeks since this post but i'm hoping you can give me some more insight to this.
You said I can accomplish this with CSS? Wouldn't that put the image behind the object? I need to have it float over the top of the object.
Thanks
|
|
|
|
|
brimbis wrote: Wouldn't that put the image behind the object?
I think you should do it ? I'm not sure. try it.
|
|
|
|
|
is there provide any php suggestion in this site in your site?
if anybody know another please provide me url of the web.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
PHP suggestion..?
If you mean a PHP forum, there's one here.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
|
On my website, members can send messages to each other, the message is sent directly to the member's email address, I'm worried that some members can send spam to other members (I have a basic spam filter in my site but there's no guarantee it will detect all spam messages) and since the mail is sent from my site's domain I could get my domain blacklisted in free mail providers like hotmail, yahoo, gmail .. etc, any suggestions how I could avoid this?
I thought about sending the mail from a randomly generated email address that doesn't exist, e.g. 0fcc717f-43f9-4dbc-99ad-166bb22f1c2b@mysite.com (using a guid), so that if the address gets blocked it shouldn't be a problem as it will not used again anyway, how effective is this in your opinion? will my whole domain be blocked if any spam sent from it?
Thanks for your suggestions ...
|
|
|
|
|
Without knowing anything about your site, how about restricting the number of emails any member can send in a day?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi Bob, thanks for your reply but actually my question is not about how to fight spam on my website it's about how to make messages sent from my website get through the spam filters of the major free webmail providers like hotmail, gmail, yahoo, aol .. etc, and also how to avoid having the domain of my website blacklisted on those mail providers (which will consequentially cuase any mail sent from my website to end up in the junk/spam folder), by the way, I already implemented some restrictions on the number of messages a member can send per session but not a limit (if a member sends more than x messages per session, they will have to pass a captcha for every message they send after this in the same session, like what happens in popular social networks like myspace and hi5) ..
regards
|
|
|
|
|
Waleed Eissa wrote: by the way, I already implemented some restrictions on the number of messages a member can send per session but not a limit
Got there before me then. Sorry I can't offer any further suggestions.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi every-one,
Short: My name is Ian, I am actually learning web programming, please if any one can answer me on my burning question - thank you.
1: Is it possible to access another sql server from a website
2: I want to create login and access ie. read and write client specific data to and from the client db.
3: What controls or how do I manipulate .net controls to allow me access on these db's
If any one can assist me please and Thank you
Ian
WOW
|
|
|
|
|
Hi,
I am not sure what you meant by another sql server. Yes you can connect to multiple sql server through your website. Its up to you how you manage your connections. You could use GridView, DataList etch controls to access your Db but not sure what exactly you are trying to achieve.
|
|
|
|
|
Hi Jaffer,
Well sorry for the incomplete description. Ok, I have a client(say Pups) who needs his clients to access their information over the web. This entails that when that client logs in over the web, I must read their login information which is stored in Pups SQL Db on Pups server. Also for new clients of Pups who need to register over the web, to be able to trade with Pups, I need to Update his sql Db.
I am still new to ASP.net and web development and are not familiar with all the controls. I have however tried to adjust or change asp.net configuration and Provider but with no success.
Please if you can help me and put me into the right direction. If the information is still not enough I will elaborate more should you have more questions.
Thank you very much
WOW
|
|
|
|
|
Hi,
Are you using 2 sql servers? Because from the description i am still unable to completely understand your problem.
What i understand from your description is you might be having 2 sql servers one called pups. Okay when pups clients access pups application over web you might say you establish connection to the server using connection string 1 hitting pups database server. And when you need to connect to another database server you should use connection string 2. This logic should be embedded in your program to determine which database it should access at any particular moment.
I am assuming you know about connection string and know how to connect to a sql server in asp.net
|
|
|
|
|
Well thank you very much Jaffer, I did find information assisting me in this regard.
Ianjan
WOW
|
|
|
|
|
Buy a book mate, The MS Press books "xxxxx Step By Step" will get you started. Read articles on SQL Injection attacks as well.
|
|
|
|
|
Hi Frank,
Will definitely get a good book thank you very much
Ianjan
WOW
|
|
|
|
|
Hello all, please forgive my newbie-ness.... (at ASP.NET)
I have a tabcontainer on my masterpage where each time a tab is clicked it actually shows a different .aspx page for each tab. First, I'm not sure if I'm even going about this the right way. It works, but it's kinda slow and a very visible transition.
I just call 'Response.Redirect()' in the 'ActiveTabChanged' event depending on which tab was clicked.
Secondly, even though this works to switch from page1 to page2, it always shows the active tab as the first one after clicking on the second one, even though the second page is now showing. I even tested setting it back explicitly, and it still doesn't work.
protected void TabContainer1_ActiveTabChanged(object sender, EventArgs e)
{
switch (TabContainer1.ActiveTabIndex)
{
case 0:
Response.Redirect("default.aspx");
break;
case 1:
Response.Redirect("default2.aspx");
TabContainer1.TabIndex = 1;
break;
}
}
Thanks in advance
|
|
|
|