AleMonteiro 238 Can I pick my title?

What's your problem? You didn't explained anything.

AleMonteiro 238 Can I pick my title?

This is a known bug, to fix add this code inside the On_Init event.

Response.AddHeader( "p3p", "CP=\"IDC DSP COR ADM DEVi TATi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"" );

I suggest that you put in on a master page or, as I do: I extend the System.Web.UI.Page and override the function:

//---------------------
        // OnInit 
        //---------------------
        protected override void OnInit ( EventArgs e )
        {
            // Header para resolver problema de sessão dentro de frames
            Response.AddHeader( "p3p", "CP=\"IDC DSP COR ADM DEVi TATi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"" );
        }

Then in my page I use this class as the base.

Hope it helps!

AleMonteiro 238 Can I pick my title?

You need to the set the target of the anchor: target="FRAME"

Would be something like this:

<ul>
      <li><a href="first.html" target="myInlineFrame">First Page</a></li>
      <li><a href="second.html" target="myInlineFrame">Second Page</a></li>
    </ul>

Good luck.

AleMonteiro 238 Can I pick my title?

No problem, u r welcome.

Just mark as solved please.

AleMonteiro 238 Can I pick my title?

You can make something like this:

data = data.substring(data.lastIndexOf('-->') + 4);
AleMonteiro 238 Can I pick my title?

That's sucks... the best option is to disable this functionality on the pages you need.Talk to your host provider to know how you can do it.

But you gotta other options too, one of them is to ignore that text, use replace or something like that.

AleMonteiro 238 Can I pick my title?

what do u mean? show me the result.

AleMonteiro 238 Can I pick my title?

try alerting the data and see that it says:

alert(data);

AleMonteiro 238 Can I pick my title?

what do you mean? The length should be 4, isn't it?

And your code remains wrong: data != "true"

AleMonteiro 238 Can I pick my title?

when you print the data, what does it show?

AleMonteiro 238 Can I pick my title?

That is easily accomplished with css, use position fixed.

Fixed position is relative to the browser window, so it will never move even if the page scrolls.

Good luck.

AleMonteiro 238 Can I pick my title?

This

if (data != "true")

shoud be:

if (data == "true")
AleMonteiro 238 Can I pick my title?

Try this one:

$('ul#one > li:has(a.identified) > a').css('background-color', 'red');
AleMonteiro 238 Can I pick my title?

I'd say to try this:

$(document).ready(function(){
    $('input[name=button1]'.click(function(){
        $("p").hide();
    });
});
AleMonteiro 238 Can I pick my title?

Here is a demo:

<html>

	<script>
		function slcMes_change()
		{
			document.getElementById("slcDia").options.length = 0;
			
			for(var i=0; i < 31; i++)
			{
				document.getElementById("slcDia").options[i] = new Option(i+1, i+1);
			}
		}	
	</script>
	
	<body>
		
		<select id="slcMes" size="1" onchange="slcMes_change()">
			<option value="0">Select</option>
			<option value="1">1</option>
			<option value="2">2</option>
			<option value="3">3</option>
			<option value="4">4</option>
		</select>
	
		<select id="slcDia" size="1"></select>
		
	</body>
	
</html>

You just have to do you logic.

Hope it helps.

AleMonteiro 238 Can I pick my title?

Hi,

I'm starting with BI, Analysis Services, Cubes and ADOMD.NET.

I searched a lot and was able to make some demos, but the performance is not good.

What I'm trying to do it's a Dimension tree view explorer.

Currently I have the following code:

CubeDef cube = conn.Cubes.Find( "SCA" );
            Dimension dim =  cube.Dimensions.Find( "CLIENTE" );
            Hierarchy hrc = dim.Hierarchies.Find( "LOCAL" );

            MemberCollection estados = hrc.Levels.Find( "EST" ).GetMembers();

            StringBuilder sb = new StringBuilder();

            // Loop first level
            foreach ( Member e in estados )
            {
                sb.AppendFormat( @"<div class=""estado""><span class=""titulo"">{0}</span><div class=""cidades"">", e.Caption );

                MemberCollection cidades =  e.GetChildren();
                // Loop second level
                foreach ( Member c in cidades )
                {
                    sb.AppendFormat( @"<div class=""cidade""><span class=""titulo"">{0}</span><div class=""bairros"">", c.Caption );

                    MemberCollection bairros = c.GetChildren();
                    // Loop third level
                    foreach ( Member b in bairros )
                    {
                      sb.AppendFormat( @"<div class=""bairro"">{0}</div>", b.Caption );
                    }
                    sb.Append( "</div></div>" );
                }
                sb.Append( "</div></div>" );
            }

How can i accomplish the same result with better practices?

Thanks.

AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

JQuery UI has a good drag and drop functionality. When adding the drag on drop functionality you must specify the drop event listener, so you can do the redirection.

AleMonteiro 238 Can I pick my title?

Is only one div that you want to resize? What do you want to do with it?

AleMonteiro 238 Can I pick my title?

Just use the media="print" on a css to hide those.

Like this:

<style type="text\css" media="print">
#myFooter, #myHeader
{
    display: none;
}
</style>
AleMonteiro 238 Can I pick my title?

Yes, it's possible and not much complicated. There's another post about this. See here: http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/405660.

There he is doing with pure javascript, i would do it with JQuery, it would be much easier.

Good luck.

AleMonteiro 238 Can I pick my title?

You have the logic, you just need to get the divs instead of the images. To do that use: document.getElementsByTagName("div").

And don't forget to loop throw the array, cause in your code you are justing change the image indexed at 0.

AleMonteiro 238 Can I pick my title?

Sorry, i don't know any tutorials in that scenario, but Google knows a lot.

AleMonteiro 238 Can I pick my title?

I don't know much of PHP, so I don't know what a LIVE variable is.

But as far as I know, with session, you can do it like this:

$strEmail = $_REQUEST["email"];
$_SESSION["var"] = $strEmail;
AleMonteiro 238 Can I pick my title?

There's lots of examples at http://docs.jquery.com.
But it's quite simple, something like this:

function doMyThing(strEmail)
{
	$.post( // JQuery post method
		"MyPage.php",  // First parameter is the url
		{ email: strEmail },  // Second is the request data
		function(result) // Third is the function to handle the response
		{
			alert("AJAX Response: " + result);
		}
	);
}
AleMonteiro 238 Can I pick my title?

I never tried with List, but i think it's best to use an defined array, like MyObject[]. This way when .NET receives the data request it will know how to parse it.

Even using List, if it's a simple type(int, string, bool e etc) i think it would not be a problem. But using complex types it may be.

Hope it helps.

AleMonteiro 238 Can I pick my title?

What do you want to display on the homepage? The users? If so, use asp:repeater to create a box for each one.

To store multiple images you can do it both ways, as you said it. But i prefer to store it on disk and store the file path in the database.

If you make a folder structure like this: ~/art/[user_name]/, you don't have to store the images names on the database. But reading the DB is much faster than reading the files on the disk.

So, i would create the folder structure, as above, and a table to store the paths.

Hope it helps.

AleMonteiro 238 Can I pick my title?

href="mailto:no-reply@mydomain.com" specify to use the mailto protocol with the no-replay@mydomain.com as a parameter.

To do what you want you need to create a javascript function that will make an ajax request to change the session variable and return the content you want.

Hope it helps.

AleMonteiro 238 Can I pick my title?

Your code looks ok, did you check those itens:
- From e-mail and from password are really ok?
- Gmail port is really 587?

If it's ok, try those things:
- Don't set EnableSsl
- Don't set UseDefaultCredentials
- Don't set DeliveryMethod

i used gmail smpt and never set those, and it worked. But i don't remeber the smpt port.

Hope it helps.

AleMonteiro 238 Can I pick my title?

Did you enable .net service model?

AleMonteiro 238 Can I pick my title?

IE 9 it's even better =D

AleMonteiro 238 Can I pick my title?

I won't code it for you, but the solution is quite simple: You want to have the same functionality in the top box and in each added row, so you need to use the same logic, same functions and same css classes.

But you need to make sure that it runs under it own context, so it won't change the wrong place. To do that you have many choices, two of them are: you can check if the controls are under have certain common parent or have some common class.

Using the parent as context you could do something like this:

$('.answerBtns').click(function()
{
	var numberOfAwnsers = 
		$(this) // Button 'A' for example
			.parent() // TD
			.parent() // TR
			.find('.numberAnswerTxtRow') // Find the numberAnsser text input inside that same row
			.val(); // Get it values
	
	var numberOfSelectedAwnsers =
		$(this) // Button 'A' for example
			.parent() // TD
			.find('.answerBtnsOn') // Get all green buttons on that cell
			.length // count it;
			
	if ( numberOfSelectedAwnsers < numberOfAwnsers )
	{
		$(this).addClass('answerBtnsOn'); // Turn 'A' green too
	}
	else
	{
		alert('.....'); // Say what you want
	}
});

One catch is that if you set this listener on the document ready event, the rows added after won't be included. So for each row inserted you have to set the listener again. The easiest way to do it is to unbind all other rows and bind it all again, this way you won't have a problem with a row with multiple binds to …

AleMonteiro 238 Can I pick my title?

When you set the selectedValue with javascript it does not update the UI, for it to work, as you wish, you have to set the selectedIndex property.

If you don't have the selected index you may loop the select options and test the values to find the right index.

Hope it helps.

AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

Where are your CSS?

AleMonteiro 238 Can I pick my title?

Your menu structure is not multi-level.

Check this tread: http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/392867

AleMonteiro 238 Can I pick my title?

Didn't understand what you want.

AleMonteiro 238 Can I pick my title?

JQuery make this very easy:

<html>
	<head>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
		<script type="text/javascript">
			$(function()
			{
				$("#menu > li").click(function()
				{
					$(this).children("ol").slideToggle();
				});
			});
		</script>
	</head>

	<body>
		<ul id="menu">
		  <li>Menu Item 1
			<ol>
			  <li><a href="#">Sub Item 1.1</a></li>
			  <li><a href="#">Sub Item 1.2</a></li>
			  <li><a href="#">Sub Item 1.3</a></li>
			</ol>
		  </li>
		</ul>
	</body>
</html>

Hope it helps.

AleMonteiro 238 Can I pick my title?
echo '<button onclick="jabutton">Run</button>';

You can't put an <button> inside an <script>.

AleMonteiro 238 Can I pick my title?

There was a couple of problems with your code... i've adapted to work somewhat:

<html>
<head>

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>

	<style type="text/css">
	.cancasing {
		margin-left: 200px;
		margin-top: 100px;
		border-style:solid;
		border-width:1px;
		
		width:900px;
		height:500px;
	}
	
	</style>
	
</head>
	<script type="text/javascript">
	jQuery.fn.extend({ // Extends JQuery methods
	
		drawRect: function(options) { // add drawRect method
			
			var defaults = {
				text: 'Default text for div element', 
				x: 10,
				y: 10,
				w: 100,
				h: 200
			};
			
			var options = jQuery.extend(defaults, options);
			
			return this.each(function() {
				$("<div>") // Create div 
					.html(options.text) // Set inner html
					.css({border: '1px dotted black'}) // set css
					.addClass("ui-boxer-helper") // set class
				.appendTo($(this)); // append to object
			});
		}
	});
	
	$(function()
	{	
	 	$('#start').click(function()
	 	{
	 		$("#canvas").drawRect(
	 		{
	 			text: 'Hello world'
	 		});
	 	
	 	});
	});
	
   </script>
  </head>
<body>
	
		<div id="canvas" class="cancasing"></div>
		<button id="start">Start</button>
		
</body>

</html>

Hope it helps

AleMonteiro 238 Can I pick my title?

Jean, I didn't fully understood what you are trying to do, but I suggest you use Regular Expression for such comparisons.

AleMonteiro 238 Can I pick my title?

Please post the code for gallery.php.

The parameter 'g' is being passed thru the link, but maybe is not being used on gallery.php.

AleMonteiro 238 Can I pick my title?

What you want is a horizontal accordion menu. There's a lot of example on the web.

Here's a couple, using JQuery:

http://designreviver.com/tutorials/jquery-examples-horizontal-accordion/
http://www.portalzine.de/Horizontal_Accordion_Plugin_2/index.html

Hope it helps.

AleMonteiro 238 Can I pick my title?

You are welcome.

Just mark as solved please.

And an advice, try to be more specific on the thread title. "JS Help" means nothing inside an javascript forum. This thread, in example, could be named like "Text problem with dynamic box size" or "Dynamic box size with text".

Cheers.

AleMonteiro 238 Can I pick my title?

You have to set the text before starting the expanding.

And to be sure that the text will not overcome the size, and display outside, you have to set the overflow style to hidden;

#move { overflow: hidden; }
AleMonteiro 238 Can I pick my title?

asif39, what text? Your code don't have any text.

AleMonteiro 238 Can I pick my title?

Violet, yes. You have to calculate the coordinates and set it to the image.

And yes, it's better to start a new tread about the compatibility issue.

Please mark as solved if you don't have any more doubt about the subject.

Good luck.

AleMonteiro 238 Can I pick my title?

Violet,

about the img and src: The src is a property of the img element, so we must first find the img element to be able to get it's src. In my code I first create a variable for the img just to make the code more understandable, but we can do it all at once:

var url = $(this).children("img").attr("src");

About the quotes: it's not necessary, it's just a code pattern I use. In css we can use both url(path) and url('path'). So we can do the same in JS. If you think it's better, just cut off those things.

About the .children() and .next(): JQuery has a lot of good methods to find DOM elements. Those are just a couple, but there is a lot more, like: .find(), .parent(), .siblings(), .closest() and etc.

JQuery documentation is great for discovering those methods, and it has a lot of samples and usage example.


Now about your code:

When you use onClick="change_image('big_image_2')" you are calling the function passing the string "big_image_2" as parameter. I mean, you are sending a string not an object. That's why you need to get the object. But you can pass the object directly.

change_image('big_image_2') // The quotes means it's a string
change_image(big_image_2) // Without the quotes you are referring to the object witch the ID is big_image_2

About centering the image: If you always want to keep the image on the center you need to listen to the …

AleMonteiro 238 Can I pick my title?

Man, you posted 900 lines of code. Sorry, but I don't think anyone will go thru all that.

Post only the section you need help with.

Cheers.

AleMonteiro 238 Can I pick my title?

The syntax is wrong.

This should work:

(function($){  
	$.fn.randomize = function() {

		var defaults = {};  
		var options = $.extend(defaults, options); 

		return this.each(function() {  

			obj = $(this);
	
			alert(obj);

		});  
	}
})(jQuery);